jegg
Interface Message

All Known Implementing Classes:
MessageImpl

public interface Message

Used to wrap an application message that is being sent from one egg to another.

The Message instance not wraps the sending egg's concrete message object, but also holds a reference to the sending egg's own message port and the priority of the message.

An egg can use a EggContext.createMessage(), to wrap an application message before writing it to a message port. This can save unnecessary object creation when the same message will be sent to a list of ports.


Method Summary
 Port getFrom()
          Return the port of the egg that sent this message.
 java.lang.Object getMessage()
          Return the application message.
 Priority getPriority()
          Return the dispatch priority of this message.
 

Method Detail

getFrom

public Port getFrom()
Return the port of the egg that sent this message.

Returns:
the sending egg's message port.

getMessage

public java.lang.Object getMessage()
Return the application message.

Returns:
the application message wrapped by this JEgg message.

getPriority

public Priority getPriority()
Return the dispatch priority of this message.

Returns:
dispatch priority.


Copyright © 2004 . All Rights Reserved.