Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Message Class Reference

Inheritance diagram for Message:

Payload IMessage NullMessage Task List of all members.

Public Member Functions

Object create ()
char[] getGuid ()
void setReply (char[] channel)
char[] getReply ()
bool isReplyExpected ()
void read (IReader reader)
void write (IWriter writer)
Object create (IReader reader)

Private Member Functions

void destroy ()
long getTime ()
void setTime (long time)

Private Attributes

char[] reply

Detailed Description

A cluster-based messaging class. You should implement the various abstract methods, and optionally override the read() and write() methods to transport any non-transient content along with the task. Note that when using read() and write(), you should invoke the superclass first. That is, read() and write() should look something like this:

void read (IReader reader) { super.read (reader); reader.get (myAttribute1); reader.get (myAttribute2); reader.get (myAttribute3); } void write (IWriter writer) { super.write (writer); writer.put (myAttribute1); writer.put (myAttribute2); writer.put (myAttribute3); }

You should do it this way so that your Message can be deserialized as a superclass instance (if ever necessary).

Definition at line 77 of file Message.d.


Member Function Documentation

Object create  ) 
 

Overridable create method that simply instantiates a new instance. May be used to allocate subclassses from a freelist

Reimplemented from Payload.

Reimplemented in NullMessage, and Task.

char [] getGuid  ) 
 

Return the guid for this payload. This should be unique per payload class, if said class is used in conjunction with the clustering facilities. Inspected by the Pickle utilitiy classes.

Reimplemented from Payload.

Reimplemented in NullMessage, and Task.

void setReply char[]  channel  )  [inline]
 

Reimplemented from IMessage.

Definition at line 106 of file Message.d.

References reply.

char [] getReply  )  [inline]
 

Reimplemented from IMessage.

Definition at line 115 of file Message.d.

References reply.

bool isReplyExpected  )  [inline]
 

Definition at line 124 of file Message.d.

References reply.

void read IReader  reader  )  [inline]
 

Recover the reply-channel from the provided reader

Reimplemented from Payload.

Reimplemented in Task.

Definition at line 135 of file Message.d.

References IReader::get(), IReader::length(), and reply.

void write IWriter  writer  )  [inline]
 

Emit our reply-channel to the provided writer

Reimplemented from Payload.

Reimplemented in Task.

Definition at line 150 of file Message.d.

References IWriter::put(), and reply.

Object create IReader  reader  )  [inline]
 

Create a new instance of a payload, and populate it via read() using the specified reader

Reimplemented from Payload.

Reimplemented in Task.

Definition at line 163 of file Message.d.

void destroy  )  [inline, inherited]
 

Destroy this payload. Often used to return instances to a freelist, or otherwise release resources.

Reimplemented from IPayload.

Reimplemented in QueuedEntry, InvalidatorPayload, and ClusterEntry.

Definition at line 58 of file Payload.d.

long getTime  )  [inline, inherited]
 

Return the timestamp associated with this payload

Reimplemented from IPayload.

Definition at line 68 of file Payload.d.

References Payload::time.

Referenced by ChannelCache::lockWhereInvalid().

void setTime long  time  )  [inline, inherited]
 

Set the timestamp of this payload

Reimplemented from IPayload.

Definition at line 79 of file Payload.d.

References time.


Member Data Documentation

char [] reply [private]
 

Definition at line 79 of file Message.d.

Referenced by getReply(), isReplyExpected(), read(), setReply(), and write().


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:07 2004 for Mango by doxygen 1.3.6