|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.discovery.base.comm.DiscMessage org.ow2.jonas.discovery.base.comm.DiscGreeting
public class DiscGreeting
This class represents a special greeting message which has two uses: 1) To act as a broadcast to the domain that a new server with a given server name has started. It also includes a port that the server will listen to objections at, the domain name and state set to STARTUP. 2) To inform the newly started server that server name is already in use by another server.
Field Summary |
---|
Fields inherited from class org.ow2.jonas.discovery.base.comm.DiscMessage |
---|
DISCOVERY_PROTOCOL_VERSION |
Constructor Summary | |
---|---|
DiscGreeting(String sourceAddress,
int sourcePort)
Constructor. |
|
DiscGreeting(String sourceAddress,
int sourcePort,
String serverName,
String domainName,
boolean startingUp,
String serverId)
Constructor for a Discovery Greeting. |
Method Summary | |
---|---|
String |
getDomainName()
Gets domain name. |
String |
getServerId()
|
String |
getServerName()
returns server name. |
String |
getState()
Gets host state. |
void |
setDomainName(String domainName)
Sets the domain name. |
void |
setServerId(String serverId)
Sets the serverId. |
void |
setServerName(String serverName)
Sets the serverName. |
void |
setState(String state)
Sets the server state : STARTINGUP or DUPLICATE_NAME. |
String |
toString()
The string version of the message. |
Methods inherited from class org.ow2.jonas.discovery.base.comm.DiscMessage |
---|
getSourceAddress, getSourcePort, getVersion, setSourceAddress, setSourcePort |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DiscGreeting(String sourceAddress, int sourcePort)
sourceAddress
- Discovery addresssourcePort
- Discovery source portpublic DiscGreeting(String sourceAddress, int sourcePort, String serverName, String domainName, boolean startingUp, String serverId)
sourceAddress
- the host address to use to receive a response.sourcePort
- is the port used in the case of a point to point response.serverName
- is Jonas server name.domainName
- is Jonas domain name.startingUp
- is this server starting up or is it reporting back with a
notification stating that it owns this server name?serverId
- TODOMethod Detail |
---|
public String getServerName()
public String getDomainName()
public void setDomainName(String domainName)
domainName
- the management domain namepublic void setServerName(String serverName)
serverName
- the name of the server sending the discovery greetingpublic String getState()
public void setState(String state)
state
- state of the server sending the discovery greeting, one of DiscGreeting.
STARTUP or DiscGreeting.DUPLICATE_NAMEpublic String toString()
toString
in class DiscMessage
public String getServerId()
public void setServerId(String serverId)
serverId
- value of the serverId to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |