Bees v0.5.0 API

bees.core.kernel
Class JSICoroutine

java.lang.Object
  |
  +--bees.core.Coroutine
        |
        +--bees.core.kernel.JSICoroutine

public final class JSICoroutine
extends Coroutine

Coroutine used to pass a JSI message to a domain.


Field Summary
static int STATE_SENT
          State used when the request message was sent and the reply is expected.
 
Fields inherited from class bees.core.Coroutine
DEFAULT_TIMEOUT, INVALID_ID, STATE_ANY, STATE_COMPLETE, STATE_ERROR, STATE_ERROR_CAGED, STATE_ERROR_INTERNAL, STATE_ERROR_TIMEOUT, STATE_ERROR_USER, STATE_NEWBORN, STATE_USER
 
Constructor Summary
JSICoroutine()
          Construct an empty JSICoroutine.
 
Method Summary
static void addRootHandler(java.lang.String name, edu.utah.janosvm.kit.comm.jsi.JSIHandler jh)
          Add a JSIHandler to the current domain's JSIHandlerRoot.
 byte[] getReply()
           
 void handle(BeesEvent ae)
          Callback used to handle BeesEvents directed to this Coroutine.
 void send(EventChannel ec, edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
          Send a JSIMessage to another domain.
 java.lang.String toString()
           
 
Methods inherited from class bees.core.Coroutine
cleanup, drop, finalize, getCoroutine, getID, getState, getThrowable, setState, setThrowable, waitForCompletion, waitForCompletion, waitForState, waitForState
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATE_SENT

public static final int STATE_SENT
State used when the request message was sent and the reply is expected.
Constructor Detail

JSICoroutine

public JSICoroutine()
Construct an empty JSICoroutine.
Method Detail

addRootHandler

public static void addRootHandler(java.lang.String name,
                                  edu.utah.janosvm.kit.comm.jsi.JSIHandler jh)
Add a JSIHandler to the current domain's JSIHandlerRoot.
Parameters:
name - The name of the handler.
jh - The JSIHandler to insert.

getReply

public byte[] getReply()
Returns:
The reply to the JSI message.

send

public void send(EventChannel ec,
                 edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
Send a JSIMessage to another domain.
Parameters:
ec - The EventChannel used to send the message.
jm - The JSIMessage to pass to another domain.

handle

public void handle(BeesEvent ae)
Description copied from class: Coroutine
Callback used to handle BeesEvents directed to this Coroutine.
Overrides:
handle in class Coroutine
Following copied from class: bees.core.Coroutine
Parameters:
ae - The BeesEvent to handle.

toString

public java.lang.String toString()
Overrides:
toString in class Coroutine
Following copied from class: bees.core.Coroutine
See Also:
Object.toString()

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/