org.boris.xlloop
Class FunctionServer

java.lang.Object
  extended by org.boris.xlloop.FunctionServer
Direct Known Subclasses:
FunctionHandlerServer

public class FunctionServer
extends java.lang.Object


Nested Class Summary
static class FunctionServer.FunctionContext
           
static class FunctionServer.HandlerThread
           
 
Field Summary
protected  IFunctionHandler handler
           
protected  IFunctionServerListener listener
           
protected  int port
           
protected  java.net.ServerSocket socket
           
 
Constructor Summary
FunctionServer()
           
FunctionServer(int port)
           
FunctionServer(int port, IFunctionHandler f)
           
 
Method Summary
 IFunctionHandler getFunctionHandler()
           
 int getPort()
           
static void handleRequest(IFunctionHandler handler, IRequestProtocol protocol, java.net.Socket socket)
           
 void run()
           
 void setFunctionHandler(IFunctionHandler h)
           
 void setListener(IFunctionServerListener listener)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

port

protected int port

handler

protected IFunctionHandler handler

socket

protected java.net.ServerSocket socket

listener

protected IFunctionServerListener listener
Constructor Detail

FunctionServer

public FunctionServer()

FunctionServer

public FunctionServer(int port)

FunctionServer

public FunctionServer(int port,
                      IFunctionHandler f)
Method Detail

getPort

public int getPort()

setFunctionHandler

public void setFunctionHandler(IFunctionHandler h)

getFunctionHandler

public IFunctionHandler getFunctionHandler()

setListener

public void setListener(IFunctionServerListener listener)

stop

public void stop()
          throws java.io.IOException
Throws:
java.io.IOException

start

public void start()

run

public void run()
         throws java.io.IOException
Throws:
java.io.IOException

handleRequest

public static void handleRequest(IFunctionHandler handler,
                                 IRequestProtocol protocol,
                                 java.net.Socket socket)