|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.Message
final class Message
The internal message structure. A message is divided in 2 parts:
Field Summary | |
---|---|
(package private) short |
dest
The unique id. of destination server |
(package private) static byte |
DETACHABLE
|
(package private) AgentId |
from
AgentId of sender. |
(package private) static int |
LENGTH
|
(package private) Notification |
not
The notification. |
(package private) static byte |
NOTNULL
|
(package private) static byte |
NULL
|
(package private) static byte |
PERSISTENT
|
private static Pool |
pool
|
(package private) static long |
serialVersionUID
define serialVersionUID for interoperability |
(package private) short |
source
The unique id. of source server |
(package private) int |
stamp
The current stamp of the message |
private java.lang.String |
stringId
|
(package private) AgentId |
to
AgentId of destination agent. |
Constructor Summary | |
---|---|
private |
Message()
Construct a new message. |
Method Summary | |
---|---|
(package private) static Message |
alloc()
Allocates a message from the pool. |
(package private) static Message |
alloc(AgentId from,
AgentId to,
Notification not)
Allocates a message from the pool. |
java.lang.StringBuffer |
appendToString(java.lang.StringBuffer strbuf)
Adds a string representation for this object in the StringBuffer parameter. |
(package private) void |
delete()
Deletes the current object in persistent storage. |
(package private) void |
free()
Frees the message to the pool. |
(package private) short |
getDest()
Get the unique server id. of the addressee of this message |
(package private) short |
getSource()
Get the unique server id. of the sender of this message |
(package private) int |
getStamp()
Get the stamp of this message |
(package private) boolean |
isPersistent()
Tests if the associated notification is persistent or not. |
(package private) static Message |
load(java.lang.String name)
Restores the object state from the persistent storage. |
(package private) void |
optFromByte(byte opt)
|
(package private) byte |
optToByte()
|
private void |
readObject(java.io.ObjectInputStream in)
The readObject method is responsible for reading from the stream and restoring the classes fields. |
(package private) void |
save()
Saves the object state on persistent storage. |
private void |
set(AgentId from,
AgentId to,
Notification not)
|
java.lang.String |
toString()
Returns a string representation for this object. |
(package private) java.lang.String |
toStringId()
|
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
transient AgentId from
AgentId
of sender.
transient AgentId to
AgentId
of destination agent.
transient Notification not
transient short source
transient short dest
transient int stamp
static final int LENGTH
static final byte NULL
static final byte NOTNULL
static final byte PERSISTENT
static final byte DETACHABLE
private transient java.lang.String stringId
private static Pool pool
Constructor Detail |
---|
private Message()
Method Detail |
---|
short getSource()
short getDest()
int getStamp()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.StringBuffer appendToString(java.lang.StringBuffer strbuf)
byte optToByte()
void optFromByte(byte opt)
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
final java.lang.String toStringId()
boolean isPersistent()
void save() throws java.io.IOException
java.io.IOException
static Message load(java.lang.String name) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
- when accessing the stored image
java.lang.ClassNotFoundException
- if the stored image class may not be foundvoid delete()
static Message alloc()
static Message alloc(AgentId from, AgentId to, Notification not)
from
- id of source Agent.to
- id of destination Agent.not
- Notification to be signaled.void free()
private void set(AgentId from, AgentId to, Notification not)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |