netbula.ORPC
Class RPCClient
public abstract class RPCClient
extends java.lang.Object
Abstract base class of all RPC client classes.
IPPROTO_TCP
public static final int IPPROTO_TCP
IPPROTO_UDP
public static final int IPPROTO_UDP
RPCClient
public RPCClient()
call
public abstract void call(int proc,
XDT inarg,
XDT outarg)
throws rpc_errCall an RPC procedure. This is an abstract method to be implemented for different RPC transports.
proc - Procedure numberinarg - Input argument to be sent overoutarg - Output argument to hold results from server
call_proc0
public void call_proc0()
throws rpc_errPing the server by calling procedure 0
close
public abstract boolean close()
Close the connection to the RPC server.
connect
public abstract boolean connect()
throws rpc_errConnect to the RPC server.
finalize
protected void finalize()
getAuth
public Auth getAuth()
Get the authenticator for this RPC connection
getRpcProgramNumber
public int getRpcProgramNumber()
getRpcProtocol
public int getRpcProtocol()
getRpcVersionNumber
public int getRpcVersionNumber()
setAuth
public void setAuth(Auth au)
Set the authenticator for this RPC connection
setConnectionTimeout
public static int setConnectionTimeout(int timeout)
Set the timeout value in milliseconds for connecting to the RPC server.
The connection timeout value is shared by all client objects.
timeout - Timeout value in milliseconds.
setRpcProgramNumber
public void setRpcProgramNumber(int prog_no)
setRpcProtocol
public void setRpcProtocol(int proto)
setRpcVersionNumber
public void setRpcVersionNumber(int vno)
setServer
public void setServer(String host,
int proto)
throws rpc_errCloses existing connection and connect to another server.
host - Server hostnameproto - Protocol
setTimeout
public int setTimeout(int timeout)
Set the timeout value for the RPC calls
timeout - Timeout value in milliseconds.