|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.distinct.rpc.ClientGeneric
|
+--com.distinct.rpc.ClientSecureRPC
Java implementation of Secure RPC protocol with AuthDes.
ClientGeneric,
AuthDes,
Serialized Form| Constructor Summary | |
ClientSecureRPC(ClientGeneric protocolp,
AuthDes auth)
Creates a Secure RPC protocol client and initializes it with a protocol client object. |
|
ClientSecureRPC(java.net.InetAddress host,
int prog,
int vers,
boolean stream,
AuthDes auth)
Creates a Secure RPC protocol client. |
|
| Method Summary | |
void |
Call(int prog,
int vers,
int proc,
XDRType in,
XDRType out)
Calls the server. |
void |
close()
Closes the connection and frees the socket resource. |
int |
getServerTime()
Returns the current system time of the server. |
void |
setCredential(Auth credp)
Sets a new authenticator and (if it is of type AuthDes) updates also the corresponding verifier. |
void |
setResend(int milliseconds)
Changes the timeout value for retransmission of the request (UDP only, default is 5s). |
void |
setTimeout(int timeout)
Changes the timeout value for waiting on server replies (default is 25s). |
| Methods inherited from class com.distinct.rpc.ClientGeneric |
Call, getReturnedVerifier, setVerifier |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ClientSecureRPC(java.net.InetAddress host,
int prog,
int vers,
boolean stream,
AuthDes auth)
throws RPCError,
java.io.IOException
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.stream - true for a TCP connection, false for UDP.auth - The AUTH_DES credential.
JRPC.RPCError - When the port can not be found in the portmapper (perhaps there is even no portmapper running).
java.io.IOException - When the socket could not be opened.
RPCError
public ClientSecureRPC(ClientGeneric protocolp,
AuthDes auth)
protocolp - The protocol object that implements the client connection (of class ClientTCP or ClientUDP).auth - The AUTH_DES credential.| Method Detail |
public void Call(int prog,
int vers,
int proc,
XDRType in,
XDRType out)
throws RPCError,
java.io.IOException
Call in class ClientGenericprog - 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.
JRPC.RPCError - When the calls fails for any other reason.
RPCError - When the calls fails for any other reason.public void close()
close in class ClientGenericpublic void setTimeout(int timeout)
setTimeout in class ClientGenerictimeout - The new timeout value in ms (0 means no timeout at all, -1 means immediate return).public void setResend(int milliseconds)
setResend in class ClientGenericmilliseconds - The new timeout value in ms.public void setCredential(Auth credp)
setCredential in class ClientGenericcredp - The new AUTH_DES authenticator.public int getServerTime()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||