All Downloads are FREE. Search and download functionalities are using the official Maven repository.

IceGrid.ServerInfo Maven / Gradle / Ivy

There is a newer version: 3.7.10
Show newest version
//
// Copyright (c) ZeroC, Inc. All rights reserved.
//
//
// Ice version 3.7.3
//
// 
//
// Generated from file `Admin.ice'
//
// Warning: do not edit this file.
//
// 
//

package IceGrid;

/**
 * Information about a server managed by an IceGrid node.
 *
 **/
public class ServerInfo implements java.lang.Cloneable,
                                   java.io.Serializable
{
    /**
     * The server application.
     *
     **/
    public String application;

    /**
     * The application uuid.
     *
     **/
    public String uuid;

    /**
     * The application revision.
     *
     **/
    public int revision;

    /**
     * The server node.
     *
     **/
    public String node;

    /**
     * The server descriptor.
     *
     **/
    public ServerDescriptor descriptor;

    /**
     * The id of the session which allocated the server.
     *
     **/
    public String sessionId;

    public ServerInfo()
    {
        this.application = "";
        this.uuid = "";
        this.node = "";
        this.sessionId = "";
    }

    public ServerInfo(String application, String uuid, int revision, String node, ServerDescriptor descriptor, String sessionId)
    {
        this.application = application;
        this.uuid = uuid;
        this.revision = revision;
        this.node = node;
        this.descriptor = descriptor;
        this.sessionId = sessionId;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        ServerInfo r = null;
        if(rhs instanceof ServerInfo)
        {
            r = (ServerInfo)rhs;
        }

        if(r != null)
        {
            if(this.application != r.application)
            {
                if(this.application == null || r.application == null || !this.application.equals(r.application))
                {
                    return false;
                }
            }
            if(this.uuid != r.uuid)
            {
                if(this.uuid == null || r.uuid == null || !this.uuid.equals(r.uuid))
                {
                    return false;
                }
            }
            if(this.revision != r.revision)
            {
                return false;
            }
            if(this.node != r.node)
            {
                if(this.node == null || r.node == null || !this.node.equals(r.node))
                {
                    return false;
                }
            }
            if(this.descriptor != r.descriptor)
            {
                if(this.descriptor == null || r.descriptor == null || !this.descriptor.equals(r.descriptor))
                {
                    return false;
                }
            }
            if(this.sessionId != r.sessionId)
            {
                if(this.sessionId == null || r.sessionId == null || !this.sessionId.equals(r.sessionId))
                {
                    return false;
                }
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int h_ = 5381;
        h_ = IceInternal.HashUtil.hashAdd(h_, "::IceGrid::ServerInfo");
        h_ = IceInternal.HashUtil.hashAdd(h_, application);
        h_ = IceInternal.HashUtil.hashAdd(h_, uuid);
        h_ = IceInternal.HashUtil.hashAdd(h_, revision);
        h_ = IceInternal.HashUtil.hashAdd(h_, node);
        h_ = IceInternal.HashUtil.hashAdd(h_, descriptor);
        h_ = IceInternal.HashUtil.hashAdd(h_, sessionId);
        return h_;
    }

    public ServerInfo
    clone()
    {
        ServerInfo c = null;
        try
        {
            c = (ServerInfo)super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return c;
    }

    public void
    ice_writeMembers(Ice.OutputStream ostr)
    {
        ostr.writeString(this.application);
        ostr.writeString(this.uuid);
        ostr.writeInt(this.revision);
        ostr.writeString(this.node);
        ostr.writeValue(this.descriptor);
        ostr.writeString(this.sessionId);
    }

    private class Patcher implements Ice.ReadValueCallback
    {
        public void
        valueReady(Ice.Object v)
        {
            if(v == null || v instanceof ServerDescriptor)
            {
                descriptor = (ServerDescriptor)v;
            }
            else
            {
                IceInternal.Ex.throwUOE(type(), v);
            }
        }

        public String
        type()
        {
            return "::IceGrid::ServerDescriptor";
        }
    }

    public void
    ice_readMembers(Ice.InputStream istr)
    {
        this.application = istr.readString();
        this.uuid = istr.readString();
        this.revision = istr.readInt();
        this.node = istr.readString();
        istr.readValue(new Patcher());
        this.sessionId = istr.readString();
    }

    static public void
    ice_write(Ice.OutputStream ostr, ServerInfo v)
    {
        if(v == null)
        {
            _nullMarshalValue.ice_writeMembers(ostr);
        }
        else
        {
            v.ice_writeMembers(ostr);
        }
    }

    static public ServerInfo
    ice_read(Ice.InputStream istr)
    {
        ServerInfo v = new ServerInfo();
        v.ice_readMembers(istr);
        return v;
    }

    private static final ServerInfo _nullMarshalValue = new ServerInfo();

    public static final long serialVersionUID = -6398544297143126669L;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy