org.boris.xlloop.util
Class CompositeFunctionServer

java.lang.Object
  extended by org.boris.xlloop.util.CompositeFunctionServer
All Implemented Interfaces:
IFunctionHandler

public class CompositeFunctionServer
extends java.lang.Object
implements IFunctionHandler

A basic function server that hosts multiple child request executors and delegates requests (in a round-robin fashion).


Constructor Summary
CompositeFunctionServer(RequestExecutor[] executors)
           
 
Method Summary
 void add(RequestExecutor re)
           
 XLoper execute(IFunctionContext context, java.lang.String name, XLoper[] args)
           
 boolean hasFunction(java.lang.String name)
           
 void remove(RequestExecutor re)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeFunctionServer

public CompositeFunctionServer(RequestExecutor[] executors)
Method Detail

add

public void add(RequestExecutor re)

remove

public void remove(RequestExecutor re)

execute

public XLoper execute(IFunctionContext context,
                      java.lang.String name,
                      XLoper[] args)
               throws RequestException
Specified by:
execute in interface IFunctionHandler
Throws:
RequestException

hasFunction

public boolean hasFunction(java.lang.String name)
Specified by:
hasFunction in interface IFunctionHandler