Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JanosVM v0.6.0 Java API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.utah.janosvm.kit.comm.jsi
Class JSIHandlerRoot

    java.lang.Object
      |
      +--edu.utah.janosvm.kit.comm.jsi.JSIHandlerRoot

public class JSIHandlerRoot
extends java.lang.Object
implements JSIHandler

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

### JSIHandlerRoot

    public JSIHandlerRoot()

  Construct an empty root handler set.

Method Detail

### 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
  Tags copied from interface: 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
  Tags copied from interface: 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
  Tags copied from interface: JSIHandler
  Parameters:
    `jm` - The message containing all supported suites.

### toString

    public java.lang.String toString()

  Overrides:
    toString in class java.lang.Object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JanosVM v0.6.0 Java API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

This documentation is Copyright (C) 2000-2002 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 Mar 17, 2002