org.sandev.basics.nodecommon
Interface Messageable

All Known Implementing Classes:
AuthorizerNodeBase, CacheManagerNodeBase, DataManagerNodeBase, MessageDriverNodeBase

public interface Messageable

The Messageable interface defines callback methods used by Messagers to deliver queries and asynchronous messages to nodes. Exceptions thrown during processing of a message may be of any framework type. It is up to the Messager implementation to wrap these appropriately.


Method Summary
 void deliver(SandMessage msg)
          Receive streamed messages.
 IDCache getIDCache()
          If this node will be caching instances locally, return the IDCache instance that will be used.
 Messager getMessager()
          Return our Messager instance
 SandMessage receive(SandMessage msg)
          Receive a query.
 void setMessager(Messager messager)
          Set our Messager instance
 

Method Detail

deliver

public void deliver(SandMessage msg)
             throws SandException
Receive streamed messages.

Throws:
SandException

receive

public SandMessage receive(SandMessage msg)
                    throws SandException
Receive a query.

Throws:
SandException

getMessager

public Messager getMessager()
Return our Messager instance


setMessager

public void setMessager(Messager messager)
Set our Messager instance


getIDCache

public IDCache getIDCache()
If this node will be caching instances locally, return the IDCache instance that will be used. Having this method in the interface allows the NodeBase code to automatically deal with incoming CacheActions.