|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kth.dks.dks_marshal.ObjectAdapter
public class ObjectAdapter
Runs inside a thread, supposedly one per DKSNode. Keeps a synchronized buffer, and dispatches messages to the right DKSNode handler.
Title: DKS
Description: DKS Middleware
Copyright: Copyright (c) 2004
Company: KTH-IMIT/SICS
| Constructor Summary | |
|---|---|
ObjectAdapter()
|
|
| Method Summary | |
|---|---|
boolean |
addMsgHandler(java.lang.String messageClassZ,
java.lang.String handlerClassZ,
java.lang.String handlerMethodZ,
java.lang.Object handlerObject)
Maps a message class, e.g. |
boolean |
callMessageHandler(DKSMessage dksMsg,
DKSRef source)
Takes a narrowed DKSMessage and dispatches it to a handler |
org.kth.dks.dks_marshal.ObjectAdapter.MessagePair |
getMessagePair()
Synchronized get method that returns a DKSMessage and the assoicated sender of the message |
boolean |
putMessagePair(DKSMessage m,
DKSRef s)
Synchronized method to put a message together with its sender in the queue |
void |
run()
Takes a bite off the msgQueue and dispatches it to the right DKSNode handler Stops if stop() is called. |
void |
stop()
Stop the running thread (for termination). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectAdapter()
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablepublic void stop()
public boolean putMessagePair(DKSMessage m,
DKSRef s)
m - DKSMessage marshalled messages - DKSRef reference to the sending node
public org.kth.dks.dks_marshal.ObjectAdapter.MessagePair getMessagePair()
public boolean addMsgHandler(java.lang.String messageClassZ,
java.lang.String handlerClassZ,
java.lang.String handlerMethodZ,
java.lang.Object handlerObject)
messageClassZ - String represeting the DKSMessage classhandlerClassZ - String representing the class of the methodhandlerMethodZ - String method namehandlerObject - Object object of type handlerClassZ which has method handlerMethodZ
public boolean callMessageHandler(DKSMessage dksMsg,
DKSRef source)
dksMsg - DKSMessage narroved message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||