|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.AgentId
public final class AgentId
An AgentId
allows for uniquely identifying and localizing
an agent throughout the distributed system. It defines variable members
describing the identifier and all needed function members to manipulate
the structure (creation, serialization, etc).
The two requirements are then:
AgentIdStamp
,
Serialized FormField Summary | |
---|---|
static int |
AMQPAgentStamp
Reserved stamp for AMQPAgent. |
static int |
ControlTopicStamp
Reserved stamp for JMS topic AgentId in charge of sending control events. |
(package private) static AgentId |
factoryId
AgentId for local factory agent. |
static int |
FactoryIdStamp
Reserved stamp for factory AgentId . |
static int |
FileTransfertStamp
Reserved stamp for fileTransfert service AgentId . |
(package private) short |
from
The identification of the agent server hosting the creating agent. |
static int |
JndiServiceStamp
Reserved stamp for JNDI service AgentId . |
static int |
JoramAdminPxStamp
Reserved stamp for JORAM administration proxy AgentId . |
static int |
JoramAdminStamp
Reserved stamp for JORAM administration topic AgentId . |
(package private) static AgentId |
localId
Used by channel to send messages without source agent (from proxy or engine). |
static int |
LocalJndiServiceStamp
Reserved stamp for local JNDI service AgentId . |
static int |
MaxIdStamp
Maximum reserved stamp. |
static int |
MaxSystemIdStamp
Maximum reserved stamp for system services. |
static int |
MaxWKSIdStamp
Maximum reserved stamp for well known services. |
static int |
MinWKSIdStamp
Minimum reserved stamp for well known services. |
static int |
NameServiceStamp
Reserved stamp for name service AgentId . |
static AgentId |
nullId
null AgentId . |
static int |
NullIdStamp
Reserved stamp for NullId. |
static int |
ResourceAgentStamp
Reserved stamp for ResourceAgent. |
static int |
SCAdminProxyStamp
Reserved stamp for SCAdmin proxy AgentId . |
static int |
SchedulerServiceStamp
Reserved stamp for scheduler service AgentId . |
(package private) static long |
serialVersionUID
Define serialVersionUID for interoperability. |
static int |
ServerConfigStamp
Reserved stamp for the server reconfiguration agent AgentId . |
(package private) int |
stamp
The stamp, local to the agent server hosting the creating agent. |
(package private) java.lang.String |
str
A temporary string representation of object in order to improve performances. |
(package private) short |
to
The identification of the agent server hosting the created agent. |
Constructor Summary | |
---|---|
AgentId()
Allocates an AgentId object for a new agent hosted by
this agent server. |
|
AgentId(short to)
Allocates an AgentId object for a new agent hosted by
specified agent server. |
|
AgentId(short from,
short to,
int stamp)
Allocates a new AgentId object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other agent id. is "equal to" this one. |
static AgentId |
factoryId(short sid)
Returns the AgentId for a remote factory agent. |
static AgentId |
fromString(java.lang.String str)
Parses the string argument as an AgentId . |
short |
getFrom()
|
int |
getStamp()
|
short |
getTo()
|
int |
hashCode()
Returns a hashcode for this AgentId object. |
(package private) static void |
init()
Statically initializes AgentId class. |
boolean |
isNullId()
|
static AgentId |
localId(short sid)
|
static int |
parseInt(java.lang.String str,
int idx,
int end)
Parses the string argument as a non signed integer. |
private void |
readObject(java.io.ObjectInputStream in)
The readObject is responsible for reading from the stream
and restoring the classes fields. |
java.lang.String |
toString()
Returns a string representation of this AgentId object. |
private void |
writeObject(java.io.ObjectOutputStream out)
The writeObject method is responsible for writing the
state of the object for its particular class so that the corresponding
readObject method can restore it. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
transient short from
transient short to
transient int stamp
transient java.lang.String str
public static final int NullIdStamp
public static final int FactoryIdStamp
AgentId
.
public static final int MaxSystemIdStamp
public static int MinWKSIdStamp
public static int NameServiceStamp
AgentId
.
public static int SchedulerServiceStamp
AgentId
.
public static int FileTransfertStamp
AgentId
.
public static int JndiServiceStamp
AgentId
.
public static int LocalJndiServiceStamp
AgentId
.
public static int SCAdminProxyStamp
AgentId
.
public static int JoramAdminStamp
AgentId
.
public static int JoramAdminPxStamp
AgentId
.
public static int ControlTopicStamp
AgentId
in charge of sending control events.
public static int ServerConfigStamp
AgentId
.
public static int ResourceAgentStamp
public static int AMQPAgentStamp
public static int MaxWKSIdStamp
public static int MaxIdStamp
public static final AgentId nullId
AgentId
.
static AgentId localId
Engine
,
Channel.sendTo(AgentId, Notification)
static AgentId factoryId
AgentId
for local factory agent.
AgentFactory
Constructor Detail |
---|
AgentId() throws java.io.IOException
AgentId
object for a new agent hosted by
this agent server.
java.io.IOException
AgentId(short to) throws java.io.IOException
AgentId
object for a new agent hosted by
specified agent server.
to
- The identification of the agent server hosting the agent.
java.io.IOException
public AgentId(short from, short to, int stamp)
AgentId
object.
from
- The identification of the agent server hosting the
creating agent.to
- The identification of the agent server hosting the agent.stamp
- The stamp of agent.Method Detail |
---|
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
writeObject
method is responsible for writing the
state of the object for its particular class so that the corresponding
readObject
method can restore it.
out
- the underlying output stream.
java.io.IOException
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
readObject
is responsible for reading from the stream
and restoring the classes fields.
in
- the underlying input stream.
java.lang.ClassNotFoundException
java.io.IOException
public static final AgentId factoryId(short sid)
AgentId
for a remote factory agent.
sid
- remote server id.
AgentId
for a remote factory agent.public static final AgentId localId(short sid)
static void init() throws java.io.IOException, java.lang.ClassNotFoundException
AgentId
class.
java.io.IOException
java.lang.ClassNotFoundException
public final short getFrom()
public final short getTo()
public final int getStamp()
public static final int parseInt(java.lang.String str, int idx, int end) throws java.lang.NumberFormatException
str
- the String
containing the integer
representation to be parsed.idx
- the beginning index, inclusive.end
- the ending index, exclusive.
java.lang.NumberFormatException
- if the String
does not contain a parsable int
.public static final AgentId fromString(java.lang.String str)
AgentId
.
AgentId
object represented by the argument.public final java.lang.String toString()
AgentId
object.
toString
in class java.lang.Object
public int hashCode()
AgentId
object.
hashCode
in class java.lang.Object
int
value represented by the stamp field.public final boolean isNullId()
true
if this id is equals to NullId;
false
otherwise.public boolean equals(java.lang.Object obj)
true
if and only if obj is an AgentId
and refer to the same agent (from, to and stamp fields are equals).
equals
in class java.lang.Object
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |