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

Constructor Index

 o ClientGeneric(InetAddress, int, int)
Generic part of protocol client creation.

Method Index

 o Call(int, int, int, XDRType, XDRType)
Calls the server.
 o Call(int, XDRType, XDRType)
Calls the server (if connected).
 o close()
Closes the connection and frees the socket resource.
 o getReturnedVerifier()
Each incoming reply includes a verifier, containing information that may be used for future authentication.
 o 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.
 o setTimeout(int)
Changes the timeout value for waiting on server replies (default is 25s).
 o 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.

Constructors

 o 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.

Methods

 o 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.
 o 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.
 o close
 public abstract void close()
Closes the connection and frees the socket resource.

 o 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).
 o 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.
 o 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.
 o 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