|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.distinct.rpc.ClientGeneric
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.
JRPCClient, Serialized Form| Constructor Summary | |
ClientGeneric(java.net.InetAddress host,
int prog,
int vers)
Generic part of protocol client creation. |
|
| Method Summary | |
abstract void |
Call(int prog,
int vers,
int proc,
XDRType in,
XDRType out)
Calls the server. |
void |
Call(int proc,
XDRType in,
XDRType out)
Calls the server (if connected). |
abstract void |
close()
Closes the connection and frees the socket resource. |
Auth |
getReturnedVerifier()
Each incoming reply includes a verifier, containing information that may be used for future authentication. |
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. |
abstract void |
setResend(int milliseconds)
Changes the timeout value for retransmission of the request (UDP only, default is 5s). |
abstract void |
setTimeout(int timeout)
Changes the timeout value for waiting on server replies (default is 25s). |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ClientGeneric(java.net.InetAddress host,
int prog,
int vers)
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.| Method Detail |
public void Call(int proc,
XDRType in,
XDRType out)
throws RPCError,
java.io.IOException
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).java.io.IOException - When the call fails because the socket connetion fails.RPCError - When the calls fails for any other reason.
public abstract void Call(int prog,
int vers,
int proc,
XDRType in,
XDRType out)
throws RPCError,
java.io.IOException
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).java.io.IOException - When the call fails because the socket connetion fails.RPCError - When the calls fails for any other reason.public abstract void close()
public abstract void setTimeout(int timeout)
timeout - The new timeout value in ms (0 means no timeout at all, -1 means immediate return).public abstract void setResend(int milliseconds)
milliseconds - The new timeout value in ms.public void setCredential(Auth credp)
credp - The new credential used for subsequent calls.public void setVerifier(Auth verfp)
verfp - The new verifier used for subsequent calls.public Auth getReturnedVerifier()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||