ninja.activeproxy.path
Class PathImplementer

java.lang.Object
  |
  +--ninja.activeproxy.path.PathImplementer

public class PathImplementer
extends java.lang.Object


Field Summary
private static long TIMEOUT
           
 
Constructor Summary
PathImplementer()
           
 
Method Summary
static PathDescription implementPath(PathDescription path)
          Given an instantiated path, start the operators and connectors on it running so client can begin writing to it.
static PathDescription killPath(PathDescription path)
           
static PathDescription killPath(PathDescription path, int from, int to)
          Kills the operators running on a particular path in the specified range of operators Remote all operators in the range path.operators[from] ..
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

TIMEOUT

private static final long TIMEOUT
Constructor Detail

PathImplementer

public PathImplementer()
Method Detail

implementPath

public static PathDescription implementPath(PathDescription path)
                                     throws java.rmi.RemoteException
Given an instantiated path, start the operators and connectors on it running so client can begin writing to it. If possible, use provided pipe connector to connect operators which are local to each other.

Requires: Path has been instantiated. pathID has been set in path.

To Do:

Error Handling! Currently if an operator doesn't respond, we don't do anything except spit out a text message. Many exceptions we dont respond to

Parameters:
path - The path to implement.
Returns:
The implemented PathDescription; return null if implementation failed

killPath

public static PathDescription killPath(PathDescription path,
                                       int from,
                                       int to)
Kills the operators running on a particular path in the specified range of operators Remote all operators in the range path.operators[from] .. path.operators[to], inclusive The lowest index is always 0, the largest numOperators-1 Requires from/to are in bounds
Parameters:
path - The path on which operators/connectors should be torn down
from - The first operator
Throws:
java.rmi.RemoteException - when an operator is not killable

killPath

public static PathDescription killPath(PathDescription path)