edu.utah.janosvm.kit.comm.jsi
Class JSIHandlerRoot
java.lang.Object
|
+--edu.utah.janosvm.kit.comm.jsi.JSIHandlerRoot
- All Implemented Interfaces:
- JSIHandler
- public class JSIHandlerRoot
- extends java.lang.Object
- implements JSIHandler
A class that manages the set of root JSI handlers.
Field Summary |
private java.util.Hashtable |
rootHandlers
A mapping from property name to JSIHandler. |
private static boolean |
verbose
|
Constructor Summary |
JSIHandlerRoot()
Construct an empty root handler set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0 |
verbose
private static final boolean verbose
rootHandlers
private final java.util.Hashtable rootHandlers
- A mapping from property name to JSIHandler.
JSIHandlerRoot
public JSIHandlerRoot()
- Construct an empty root handler set.
addHandler
public void addHandler(java.lang.String name,
JSIHandler jh)
- Add a handler with the given name.
- Parameters:
name
- The property name for the handler.jh
- The handler.
getHandler
public JSIHandler getHandler(java.lang.String name)
remHandler
public JSIHandler remHandler(java.lang.String name)
- Remove a handler with the given name.
- Parameters:
name
- The property name for the handler.
dispatchMessage
public void dispatchMessage(JSIHandlerContext jhc,
JSIMessage jm)
- Route a message to the appropriate destination.
- Parameters:
jhc
- The context to locate/execute the handler within.jm
- The message to dispatch and contains the reply on return.
resolveSpecifier
public JSIHandler resolveSpecifier(JSIMessage jm,
JSIPair jp)
throws java.lang.Throwable
- Description copied from interface:
JSIHandler
- Resolve the next specifier on the stack.
- Specified by:
resolveSpecifier
in interface JSIHandler
- Following copied from interface:
edu.utah.janosvm.kit.comm.jsi.JSIHandler
- Parameters:
jm
- The JSI message to route.jp
- The specifier pair currently being resolved.- Returns:
- The Object that can handle the given message or null if there
is none.
handleMessage
public void handleMessage(JSIHandlerContext jhc,
JSIMessage jm)
- Description copied from interface:
JSIHandler
- Process the given message.
- Specified by:
handleMessage
in interface JSIHandler
- Following copied from interface:
edu.utah.janosvm.kit.comm.jsi.JSIHandler
- Parameters:
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.- Throws:
The
- handler can throw any of a number of exceptions/erros.
getSuites
public void getSuites(JSIMessage jm)
- Description copied from interface:
JSIHandler
- Add any suites for this handler to the given message.
- Specified by:
getSuites
in interface JSIHandler
- Following copied from interface:
edu.utah.janosvm.kit.comm.jsi.JSIHandler
- Parameters:
jm
- The message containing all supported suites.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003