|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Client
A semantic marker for SwitchboardUser implementors that
are clients; also, specifies client-specific methods for the switchboard
to use. Clients request and are assigned Server objects by the
switchboard. Clients may also use the object-server facilities of the
switchboard, requesting objects for processing, processing those objects
and then sending the processed objects back to the switchboard for
output (via the Switchboard's nextObject and
putObject
methods).
Implementors should ensure that they get
SwitchboardRemote.clientNextObjectInterval from the settings
of the switchboard, for use when processing objects. This is accomplished
in AbstractClient by the
AbstractClient.setNextObjectInterval() method.
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.
Server,
SwitchboardRemote,
AbstractClient| Method Summary | |
|---|---|
void |
serverDown(int serverId)
Tells a client that its server has died. |
| Methods inherited from interface danbikel.switchboard.SwitchboardUser |
|---|
alive, die, host, id |
| Method Detail |
|---|
void serverDown(int serverId)
throws RemoteException
SwitchboardUser.die(boolean).
Important synchronization note: This method should be non-blocking. That is, it shouldn't wait for some switchboard resource (such as a new server) or information to become available before returning. If this condition is not met, then deadlock could occur.
RemoteException
|
Parsing Engine | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||