|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Server
A semantic marker for those switchboard users that are servers;
also, specifies server-specific methods for the switchboard to use.
Servers are assigned Client
objects by the
switchboard.
A note on fault tolerance: In order to ensure the
fault-tolerance of clients, implementors should ensure that they
use socket factories that set the SO_TIMEOUT values of
their TCP/IP sockets to some integer greater than 0, by providing
custom socket factories that provide at least the functionality of
TimeoutSocketFactory
.
Subclasses that use sockets other than TCP/IP sockets should have
similar non-infinite timeouts.
Client
,
SwitchboardRemote
,
AbstractServer
Field Summary | |
---|---|
static int |
acceptUnlimitedClients
|
Method Summary | |
---|---|
boolean |
acceptClientsOnlyByRequest()
Returns whether this server is only willing to accept clients that request it. |
int |
id()
Returns the ID number of this server. |
int |
maxClients()
The maximum number of clients this server is willing to accept, or acceptUnlimitedClients if this server is willing to accept a
virtually unlimited number of clients (a large maximum value may
be used by the switchboard). |
Methods inherited from interface danbikel.switchboard.SwitchboardUser |
---|
alive, die, host |
Field Detail |
---|
static final int acceptUnlimitedClients
Method Detail |
---|
int maxClients() throws RemoteException
acceptUnlimitedClients
if this server is willing to accept a
virtually unlimited number of clients (a large maximum value may
be used by the switchboard). It is an error for this method to
return any number other than a non-zero positive integer or
the special value.
Note that a server may change the return value of this method over time; this method is guaranteed to be called and its value cached every time a client is assigned to this server.
RemoteException
SwitchboardRemote.register(Server)
boolean acceptClientsOnlyByRequest() throws RemoteException
Note that a server may change the return value of this method over time; this method is guaranteed to be called and its value cached every time a client is assigned to this server.
RemoteException
SwitchboardRemote.register(Server)
,
SwitchboardRemote.getServer(int,int)
int id() throws RemoteException
id
in interface SwitchboardUser
RemoteException
|
Parsing Engine | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |