|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.utah.janosvm.kit.comm.jsi.JSIHandlerRoot
A class that manages the set of root JSI handlers.
Constructor Summary | |
JSIHandlerRoot()
Construct an empty root handler set. |
Method Summary | |
void |
addHandler(java.lang.String name,
JSIHandler jh)
Add a handler with the given name. |
void |
dispatchMessage(JSIHandlerContext jhc,
JSIMessage jm)
Route a message to the appropriate destination. |
JSIHandler |
getHandler(java.lang.String name)
|
void |
getSuites(JSIMessage jm)
Add any suites for this handler to the given message. |
void |
handleMessage(JSIHandlerContext jhc,
JSIMessage jm)
Process the given message. |
JSIHandler |
remHandler(java.lang.String name)
Remove a handler with the given name. |
JSIHandler |
resolveSpecifier(JSIMessage jm,
JSIPair jp)
Resolve the next specifier on the stack. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JSIHandlerRoot()
Method Detail |
public void addHandler(java.lang.String name, JSIHandler jh)
name
- The property name for the handler.jh
- The handler.public JSIHandler getHandler(java.lang.String name)
public JSIHandler remHandler(java.lang.String name)
name
- The property name for the handler.public void dispatchMessage(JSIHandlerContext jhc, JSIMessage jm)
jhc
- The context to locate/execute the handler within.jm
- The message to dispatch and contains the reply on return.public JSIHandler resolveSpecifier(JSIMessage jm, JSIPair jp) throws java.lang.Throwable
JSIHandler
resolveSpecifier
in interface JSIHandler
edu.utah.janosvm.kit.comm.jsi.JSIHandler
jm
- The JSI message to route.jp
- The specifier pair currently being resolved.public void handleMessage(JSIHandlerContext jhc, JSIMessage jm)
JSIHandler
handleMessage
in interface JSIHandler
edu.utah.janosvm.kit.comm.jsi.JSIHandler
jhc
- The context in which to send/process interim messages.jm
- The received message. When processing is done the message
should be cleared and any reply data placed inside it.The
- handler can throw any of a number of exceptions/erros.public void getSuites(JSIMessage jm)
JSIHandler
getSuites
in interface JSIHandler
edu.utah.janosvm.kit.comm.jsi.JSIHandler
jm
- The message containing all supported suites.public java.lang.String toString()
toString
in class java.lang.Object
|
JanosVM v1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |