caffeinterface
Class CaffeServer

java.lang.Object
  extended by caffeinterface.CaffeServer

public class CaffeServer
extends java.lang.Object

Provides functionality to run CAFFE classes in client-server mode. This is the server end of things. Uses protocol buffers and the RPC socket implementation by Shardul Deo.

Author:
dgorur

Field Summary
static int DEFAULT_PORT
          Uses port 5000.
 
Constructor Summary
CaffeServer()
          Creates a CaffeServer listening on the default port.
CaffeServer(CaffeToVectorFunction vectorFunction)
          Creates a CaffeServer serving the given CaffeToVectorFunction on the default port.
CaffeServer(CaffeToVectorFunction vectorFunction, int port)
          Creates a CaffeServer serving the given CaffeToVectorFunction on the requested port.
 
Method Summary
static void main(java.lang.String[] args)
           
 void run()
          Runs the server!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Uses port 5000. If you want to override this DEFAULT, write a subclass. This class provides a constructor for using other ports, so as long as you don't want to change the defaults, use that.

See Also:
Constant Field Values
Constructor Detail

CaffeServer

public CaffeServer()
Creates a CaffeServer listening on the default port.


CaffeServer

public CaffeServer(CaffeToVectorFunction vectorFunction)
Creates a CaffeServer serving the given CaffeToVectorFunction on the default port. In an effort to move away from distinguishing ScalarFunctions and VectorFunctions, only the vector-function interface is provided here.

Parameters:
vectorFunction - the VectorFunction to serve.

CaffeServer

public CaffeServer(CaffeToVectorFunction vectorFunction,
                   int port)
Creates a CaffeServer serving the given CaffeToVectorFunction on the requested port.

Parameters:
vectorFunction - the given CaffeToVectorFunction
port - the requested port.
Method Detail

main

public static void main(java.lang.String[] args)

run

public void run()
Runs the server!