|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.acplt.oncrpc.server.OncRpcServerStub
public abstract class OncRpcServerStub
The abstract OncRpcServerStub class is the base class to
build ONC/RPC-program specific servers upon. This class is typically
only used by jrpcgen generated servers, which provide a particular
set of remote procedures as defined in a x-file.
| Field Summary | |
|---|---|
private java.lang.String |
characterEncoding
Encoding to use when deserializing strings or null if
the system's default encoding should be used. |
OncRpcServerTransportRegistrationInfo[] |
info
Array containing program and version numbers tuples this server is willing to handle. |
protected java.lang.Object |
shutdownSignal
Notification flag for signalling the server to stop processing incomming remote procedure calls and to shut down. |
OncRpcServerTransport[] |
transports
Array containing ONC/RPC server transport objects which describe what transports an ONC/RPC server offers for handling ONC/RPC calls. |
| Constructor Summary | |
|---|---|
OncRpcServerStub()
|
|
| Method Summary | |
|---|---|
void |
close(OncRpcServerTransport[] transports)
Close all transports listed in a set of server transports. |
java.lang.String |
getCharacterEncoding()
Get the character encoding for deserializing strings. |
void |
register(OncRpcServerTransport[] transports)
Register a set of server transports with the local portmapper. |
void |
run()
All inclusive convenience method: register server transports with portmapper, then run the call dispatcher until the server is signalled to shut down, and finally deregister the transports. |
void |
run(OncRpcServerTransport[] transports)
Process incomming remote procedure call requests from all specified transports. |
void |
setCharacterEncoding(java.lang.String characterEncoding)
Set the character encoding for deserializing strings. |
void |
stopRpcProcessing()
Notify the RPC server to stop processing of remote procedure call requests as soon as possible. |
void |
unregister(OncRpcServerTransport[] transports)
Unregister a set of server transports from the local portmapper. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public OncRpcServerTransport[] transports
public OncRpcServerTransportRegistrationInfo[] info
protected java.lang.Object shutdownSignal
private java.lang.String characterEncoding
null if
the system's default encoding should be used.
| Constructor Detail |
|---|
public OncRpcServerStub()
| Method Detail |
|---|
public void run()
throws OncRpcException,
java.io.IOException
OncRpcException - if the portmapper can not be contacted
successfully.
java.io.IOException - if a severe network I/O error occurs in the
server from which it can not recover (like severe exceptions thrown
when waiting for now connections on a server socket).
public void register(OncRpcServerTransport[] transports)
throws OncRpcException
transports - Array of server transport objects to register,
which will later handle incomming remote procedure call requests.
OncRpcException - if the portmapper could not be contacted
successfully.public void run(OncRpcServerTransport[] transports)
shutdownSignal object. Note that the thread on which
run() is called will ignore any interruptions and
will silently swallow them.
transports - Array of server transport objects for which
processing of remote procedure call requests should be done.public void stopRpcProcessing()
close(org.acplt.oncrpc.server.OncRpcServerTransport[]) method of the server.
public void unregister(OncRpcServerTransport[] transports)
throws OncRpcException
transports - Array of server transport objects to unregister.
OncRpcException - with a reason of
OncRpcException.RPC_FAILED if
the portmapper could not be contacted successfully. Note that
it is not considered an error to remove a non-existing entry from
the portmapper.public void close(OncRpcServerTransport[] transports)
transports - Array of server transport objects to close.public void setCharacterEncoding(java.lang.String characterEncoding)
characterEncoding - the encoding to use for deserializing strings.
If null, the system's default encoding is to be used.public java.lang.String getCharacterEncoding()
null, then the system's default encoding is used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||