IceGrid.ServerDynamicInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of icegrid-compat Show documentation
Show all versions of icegrid-compat Show documentation
Locate, deploy, and manage Ice servers
//
// 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;
/**
* Dynamic information about the state of a server.
*
**/
public class ServerDynamicInfo implements java.lang.Cloneable,
java.io.Serializable
{
/**
* The id of the server.
*
**/
public String id;
/**
* The state of the server.
*
**/
public ServerState state;
/**
* The process id of the server.
*
**/
public int pid;
/**
* Indicates whether the server is enabled.
*
**/
public boolean enabled;
public ServerDynamicInfo()
{
this.id = "";
this.state = ServerState.Inactive;
}
public ServerDynamicInfo(String id, ServerState state, int pid, boolean enabled)
{
this.id = id;
this.state = state;
this.pid = pid;
this.enabled = enabled;
}
public boolean
equals(java.lang.Object rhs)
{
if(this == rhs)
{
return true;
}
ServerDynamicInfo r = null;
if(rhs instanceof ServerDynamicInfo)
{
r = (ServerDynamicInfo)rhs;
}
if(r != null)
{
if(this.id != r.id)
{
if(this.id == null || r.id == null || !this.id.equals(r.id))
{
return false;
}
}
if(this.state != r.state)
{
if(this.state == null || r.state == null || !this.state.equals(r.state))
{
return false;
}
}
if(this.pid != r.pid)
{
return false;
}
if(this.enabled != r.enabled)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int h_ = 5381;
h_ = IceInternal.HashUtil.hashAdd(h_, "::IceGrid::ServerDynamicInfo");
h_ = IceInternal.HashUtil.hashAdd(h_, id);
h_ = IceInternal.HashUtil.hashAdd(h_, state);
h_ = IceInternal.HashUtil.hashAdd(h_, pid);
h_ = IceInternal.HashUtil.hashAdd(h_, enabled);
return h_;
}
public ServerDynamicInfo
clone()
{
ServerDynamicInfo c = null;
try
{
c = (ServerDynamicInfo)super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return c;
}
public void
ice_writeMembers(Ice.OutputStream ostr)
{
ostr.writeString(this.id);
ServerState.ice_write(ostr, this.state);
ostr.writeInt(this.pid);
ostr.writeBool(this.enabled);
}
public void
ice_readMembers(Ice.InputStream istr)
{
this.id = istr.readString();
this.state = ServerState.ice_read(istr);
this.pid = istr.readInt();
this.enabled = istr.readBool();
}
static public void
ice_write(Ice.OutputStream ostr, ServerDynamicInfo v)
{
if(v == null)
{
_nullMarshalValue.ice_writeMembers(ostr);
}
else
{
v.ice_writeMembers(ostr);
}
}
static public ServerDynamicInfo
ice_read(Ice.InputStream istr)
{
ServerDynamicInfo v = new ServerDynamicInfo();
v.ice_readMembers(istr);
return v;
}
private static final ServerDynamicInfo _nullMarshalValue = new ServerDynamicInfo();
public static final long serialVersionUID = 5556911587584387520L;
}