Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

org::apache::vinci::transport::BaseServer Class Reference

Inheritance diagram for org::apache::vinci::transport::BaseServer:
Inheritance graph
Collaboration diagram for org::apache::vinci::transport::BaseServer:
Collaboration graph

List of all members.


class  PooledThread

Public Member Functions

 BaseServer (VinciServable my_servable)
Transportable eval (Transportable in, KeyValuePair header)
VinciServable getServable ()
Transportable makeTransportable ()
void serve (int port) throws IOException
void setSocketTimeout (int millis) throws IOException
void setThreadPoolSize (int initial, int max)
void shutdownServing ()
void startServing (int port) throws IOException

Protected Member Functions

void cleanExit ()
ServerSocket createServerSocket (int port) throws IOException
Runnable getRunnable (Socket client)
ServerSocket getServerSocket ()
void handleRequest (Socket client)
void handleRequests ()

Private Member Functions

void configureServerSocket (int port) throws IOException
void expandOrWait () throws InterruptedException
PooledThread getThreadFromPool () throws InterruptedException
void initializeServing ()

Private Attributes

int busyCount
PooledThread[] busyThreads
int initialPoolSize
volatile boolean isServing
int maxPoolSize
int pooledCount
VinciServable servable
ServerSocket serverSocket
Thread servingThread
volatile boolean shutdown
int socketTimeout
PooledThread[] threadPool

Static Private Attributes

static final int DEFAULT_MAX_POOL_SIZE = 20
static final int DEFAULT_SOCKET_TIMEOUT = 60000
static final int SERVER_SOCKET_TIMEOUT = 1000

Detailed Description

Class for running VinciServables in the Vinci framework. This implementation supports multiple concurrent clients (in a Thread per client manner). Creating a service typically requires defining implementing a VinciServable which is passed to this class to service requests.

This class can be used independently of VNS. For VNS-enhanced serving, use the VinciServer.

This class is designed to be extensible. For example you can extend to provide new Runnable objects that are used to handle requests in the appropriate fashion. You can also override configure socket to install SSL-supporting server sockets, and so on...

Definition at line 40 of file BaseServer.java.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index