All Packages Class Hierarchy This Package Previous Next Index
Class distinct.rpc.ClientGeneric
java.lang.Object
|
+----distinct.rpc.ClientGeneric
- public abstract class ClientGeneric
- extends Object
- implements Serializable
From this abstract class, the protocol client classes (TCP, UDP and HTTP) are derived.
It declares the methods for connecting to a server and invoking it.
- See Also:
- JRPCClient
-
ClientGeneric(InetAddress, int, int)
- Generic part of protocol client creation.
-
Call(int, int, int, XDRType, XDRType)
- Calls the server.
-
Call(int, XDRType, XDRType)
- Calls the server (if connected).
-
close()
- Closes the connection and frees the socket resource.
-
getReturnedVerifier()
- Each incoming reply includes a verifier, containing information that may be
used for future authentication.
-
setCredential(Auth)
- Each outgoing call includes a credential, containing a description of the
identity of the caller and a verifier used for authenticating this identity.
-
setTimeout(int)
- Changes the timeout value for waiting on server replies (default is 25s).
-
setVerifier(Auth)
- Each outgoing call includes a credential, containing a description of the
identity of the caller and a verifier used for authenticating this identity.
ClientGeneric
public ClientGeneric(InetAddress host,
int prog,
int vers)
- Generic part of protocol client creation.
- Parameters:
- host - The host on which the server lives.
- prog - The program ID of the server as defined in the .x IDL file.
- vers - The program version of the server as defined in the .x IDL file.
Call
public void Call(int proc,
XDRType in,
XDRType out) throws RPCError, IOException
- Calls the server (if connected).
- Parameters:
- proc - The ID of the request function as defined in the .x IDL file.
- in - The input parameter (as it has to be marshalled it must be derived from XDRType).
- out - The output parameter (as it has to be marshalled it must be derived from XDRType).
- Throws: IOException
- When the call fails because the socket connetion fails.
- Throws: RPCError
- When the calls fails for any other reason.
Call
public abstract void Call(int prog,
int vers,
int proc,
XDRType in,
XDRType out) throws RPCError, IOException
- Calls the server.
- Parameters:
- prog - The program ID of the server as defined in the .x IDL file.
- vers - The program version of the server as defined in the .x IDL file.
- proc - The ID of the request function as defined in the .x IDL file.
- in - The input parameter (as it has to be marshalled it must be derived from XDRType).
- out - The output parameter (as it has to be marshalled it must be derived from XDRType).
- Throws: IOException
- When the call fails because the socket connetion fails.
- Throws: RPCError
- When the calls fails for any other reason.
close
public abstract void close()
- Closes the connection and frees the socket resource.
setTimeout
public abstract void setTimeout(int timeout)
- Changes the timeout value for waiting on server replies (default is 25s).
- Parameters:
- timeout - The new timeout value in ms (0 means no timeout at all, -1 means immediate return).
setCredential
public void setCredential(Auth credp)
- Each outgoing call includes a credential, containing a description of the
identity of the caller and a verifier used for authenticating this identity.
The exact semantics of the credential and verifier data depend on the
authentication scheme used (AUTH_NULL, AUTH_SHORT, AUTH_UNIX or AUTH_DES).
Default are an AUTH_NULL credential and an AUTH_NULL verifier (implemented
by class distinct.rpc.Auth). This method changes this default and sets the
credential object (a subclass of distinct.rpc.Auth) used for all subsequent
calls of this client.
- Parameters:
- credp - The new credential used for subsequent calls.
setVerifier
public void setVerifier(Auth verfp)
- Each outgoing call includes a credential, containing a description of the
identity of the caller and a verifier used for authenticating this identity.
The exact semantics of the credential and verifier data depend on the
authentication scheme used (AUTH_NULL, AUTH_SHORT, AUTH_UNIX or AUTH_DES).
Default are an AUTH_NULL credential and an AUTH_NULL verifier (implemented
by class distinct.rpc.Auth). This method sets the verifier object (a subclass
of distinct.rpc.Auth) used for all subsequent calls of this client.
- Parameters:
- verfp - The new verifier used for subsequent calls.
getReturnedVerifier
public Auth getReturnedVerifier()
- Each incoming reply includes a verifier, containing information that may be
used for future authentication. This method returns the verifier object (a
subclass of distinct.rpc.Auth) provided by the most recent reply received
by this client.
- Returns:
- The verifier from the most recent reply received.
All Packages Class Hierarchy This Package Previous Next Index