Package org.acplt.oncrpc
Class OncRpcClientStub
java.lang.Object
org.acplt.oncrpc.OncRpcClientStub
The abstract
OncRpcClientStub class is the base class to
build ONC/RPC-program specific clients upon. This class is typically
only used by jrpcgen generated clients, which provide a particular
set of remote procedures as defined in a x-file.
When you do not need the client proxy object any longer, you should
return the resources it occupies to the system. Use the close()
method for this.
client.close(); client = null; // Hint to the garbage (wo)man
- Version:
- $Revision: 1.1.1.1 $ $Date: 2003/08/13 12:03:44 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OncRpcClientThe real ONC/RPC client which is responsible for handling a particular IP protocol. -
Constructor Summary
ConstructorsConstructorDescriptionOncRpcClientStub(InetAddress host, int program, int version, int port, int protocol) Construct a newOncRpcClientStubfor communication with a remote ONC/RPC server.OncRpcClientStub(OncRpcClient client) Construct a newOncRpcClientStubwhich uses the given client proxy object for communication with a remote ONC/RPC server. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the connection to an ONC/RPC server and free all network-related resources.Returns ONC/RPC client proxy object used for communication with a remote ONC/RPC server.
-
Field Details
-
client
The real ONC/RPC client which is responsible for handling a particular IP protocol.
-
-
Constructor Details
-
OncRpcClientStub
public OncRpcClientStub(InetAddress host, int program, int version, int port, int protocol) throws OncRpcException, IOException Construct a newOncRpcClientStubfor communication with a remote ONC/RPC server.- Parameters:
host- Host address where the desired ONC/RPC server resides.program- Program number of the desired ONC/RPC server.version- Version number of the desired ONC/RPC server.protocol-Protocolto be used for ONC/RPC calls. This information is necessary, so port lookups through the portmapper can be done.- Throws:
OncRpcException- if an ONC/RPC error occurs.IOException- if an I/O error occurs.
-
OncRpcClientStub
Construct a newOncRpcClientStubwhich uses the given client proxy object for communication with a remote ONC/RPC server.- Parameters:
client- ONC/RPC client proxy object implementing a particular IP protocol.- Throws:
OncRpcExceptionIOException
-
-
Method Details
-
close
Close the connection to an ONC/RPC server and free all network-related resources. Well -- at least hope, that the Java VM will sometimes free some resources. Sigh.- Throws:
OncRpcException- if an ONC/RPC error occurs.
-
getClient
Returns ONC/RPC client proxy object used for communication with a remote ONC/RPC server.- Returns:
- ONC/RPC client proxy.
-