net.metanotion.util
Interface Message<O>

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
OOBExceptionMessage, OOBIdleMessage

public interface Message<O>
extends java.io.Serializable

Interface defining a reified message to send to an object.


Method Summary
 java.lang.Object call(O o)
          Call a method on o, returning the return values.
 java.lang.Class<O> getInterface()
          Get the Class object for interface this Message expects
 void send(O o)
          Send a message to o, ignore any return values.
 

Method Detail

send

void send(O o)
Send a message to o, ignore any return values. (Asynchronous)

Parameters:
o - Object to receive the message.

call

java.lang.Object call(O o)
Call a method on o, returning the return values. (Synchronous)

Parameters:
o - Object to receive the message.
Returns:
Result of the message.

getInterface

java.lang.Class<O> getInterface()
Get the Class object for interface this Message expects

Returns:
Class object representing the interface this message expects to send to.