public final class ServerDesc extends Object implements Serializable
Channel
and
Network
objects. Be careful, this structure is initialized
in AgentServer, but it can be viewed outside of the agent package, so
it's very important to make all modifiers package.Modifier and Type | Field and Description |
---|---|
(package private) boolean |
active
True if there is no waiting messages for this server.
|
private MessageConsumer |
domain
Domain description of this server.
|
(package private) short |
gateway
Server Identifier of a gateway server for this server if it is not in an adjoining domain.
|
(package private) long |
last
Date of the last unsuccessful connection to this server.
|
(package private) String |
name
Server name.
|
(package private) int |
retry
Number of unsuccessful connection to this server.
|
private static long |
serialVersionUID |
(package private) ServiceDesc[] |
services
Description of services running on this server.
|
(package private) short |
sid
Server unique identifier.
|
private Vector<SocketAddress> |
sockAddrs
The IP address of the server.
|
Constructor and Description |
---|
ServerDesc(short sid,
String name,
String hostname,
int port)
Constructs a new node for a persistent agent server.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addSockAddr(String hostname,
int port) |
InetAddress |
getAddr()
Returns an IP address for its server.
|
MessageConsumer |
getDomain() |
String |
getDomainName() |
Class<MessageConsumer> |
getDomainType() |
short |
getGateway() |
String |
getHostname()
Gets hostname for this server.
|
int |
getPort()
Gets port for this server.
|
short |
getServerId()
Gets server id. for this server.
|
String |
getServerName()
Gets server name for this server.
|
ServiceDesc[] |
getServices()
Gets the description of services running on this server.
|
(package private) Enumeration<SocketAddress> |
getSockAddrs()
In case of an HA server, gets the IP address of all the components
of the HA configuration.
|
(package private) void |
moveToFirst(SocketAddress addr)
In case of an HA server, selects the IP address as this of the master
component of the HA configuration.
|
InetAddress |
resetAddr()
Resolves an IP address for its server, don't use an eventually caching
address.
|
void |
setDomain(MessageConsumer domain) |
void |
setGateway(short id) |
String |
toString()
Provides a string image for this object.
|
void |
updateSockAddr(String hostname,
int port) |
private static final long serialVersionUID
short sid
String name
private Vector<SocketAddress> sockAddrs
SocketAddress
) of remote server. The communication port
is set only if the server is directly accessible from this node; in
this case it corresponds to the communication port of the server in the
adjoining domain.
The descriptor of an HA server contains one SocketAddress
for each of its constituent.transient ServiceDesc[] services
short gateway
private transient MessageConsumer domain
transient volatile boolean active
transient volatile long last
transient volatile int retry
public short getServerId()
public String getServerName()
public String getHostname()
public int getPort()
public InetAddress getAddr()
public InetAddress resetAddr()
void addSockAddr(String hostname, int port)
public void updateSockAddr(String hostname, int port)
void moveToFirst(SocketAddress addr)
addr
- the socket address.Enumeration<SocketAddress> getSockAddrs()
public ServiceDesc[] getServices()
public short getGateway()
public void setGateway(short id)
public String getDomainName()
public Class<MessageConsumer> getDomainType()
public String toString()
public void setDomain(MessageConsumer domain)
public MessageConsumer getDomain()
Copyright © 2021 ScalAgent D.T.. All rights reserved.