netbula.ORPC

Class Server

Implemented Interfaces:
Runnable
Known Direct Subclasses:
TCPServer, UDPServer

public abstract class Server
extends java.lang.Object
implements Runnable

This abstract class represents an RPC server. It brings life to an RPC service (Svc).

Method Summary

ExecutorService
assignFixedThreadPool(int nThreads)
Assign a fixed number of server threads.
ExecutorService
getExecutorSvc()
Get the executor.
int
getPort()
Get the port number of the RPC server
int
getProg()
Svc
getSvc()
Get the Svc object bound with this server.
int
getVers()
boolean
isTCP()
Check if it is a TCP server.
boolean
register()
ExecutorService
setExecutorSvc(ExecutorService newExecSvc)
Set the executor.
void
setSvc(Svc s)
Set the Svc object bound with this server.
boolean
unregister()

Method Details

assignFixedThreadPool

public ExecutorService assignFixedThreadPool(int nThreads)
Assign a fixed number of server threads. Returns previous executor.

getExecutorSvc

public ExecutorService getExecutorSvc()
Get the executor.

getPort

public int getPort()
Get the port number of the RPC server

getProg

public int getProg()

getSvc

public Svc getSvc()
Get the Svc object bound with this server.

getVers

public int getVers()

isTCP

public boolean isTCP()
Check if it is a TCP server.

register

public boolean register()
            throws rpc_err

setExecutorSvc

public ExecutorService setExecutorSvc(ExecutorService newExecSvc)
Set the executor. Returns previous executor.

setSvc

public void setSvc(Svc s)
Set the Svc object bound with this server.

unregister

public boolean unregister()
            throws rpc_err