All Packages Class Hierarchy This Package Previous Next Index
Class netbula.ORPC.ClientGeneric
java.lang.Object
|
+----netbula.ORPC.ClientGeneric
- public class ClientGeneric
- extends Object
The ClientGeneric class is a wrapper for ClientTCP, ClientUDP and
ClientHTTP classes. This class is used in the jrpcgen generated client
code to call the server. Normally, one does not use this class directly.
-
ClientGeneric(InetAddress, int, int, int, String)
- Construct a generic RPC client object
-
ClientGeneric(String, int, int, String)
- Construct a generic RPC client object
-
call(int, XDT, XDT)
- Make an RPC call via the underlying RPC client handle.
-
call_proc0()
- Ping the RPC by calling procedure 0
-
close()
- Close the RPC connection
-
connect()
- Connect to the RPC server
-
getAuth()
-
-
getClient()
-
-
setAuth(Auth)
- Set authentication
-
setClient(RPCClient)
- Set the underlying client handle to a bound RPCClient object
-
setServer(String, int)
- When HTTP protocol is used, and the servlet/CGI is a proxy to
a real RPC server, call this function to set the hostname of
the real server and protocol to use for it.
-
setTimeout(int)
- Set the timeout value (in milliseconds) for the RPC calls
ClientGeneric
public ClientGeneric(InetAddress inetAddress,
int prog,
int ver,
int port,
String proto) throws rpc_err
- Construct a generic RPC client object
- Parameters:
- inetAddress - Address of the server machine
- prog - program number of the RPC service
- ver - version number of the RPC service
- port - port number of the RPC service
- proto - "tcp" or "udp" only (no http)
ClientGeneric
public ClientGeneric(String host_or_url,
int prog,
int ver,
String proto) throws rpc_err
- Construct a generic RPC client object
- Parameters:
- host_or_url - hostname.domain of the server machine, or the URL of the servlet or CGI program
if proto is "http".
- prog - program number of the RPC service
- ver - version number of the RPC service
- proto - "tcp" , "udp" or "http". For "http", one should call setServer() function to set
the remote RPC server name, if the servlet/CGI is a proxy.
setServer
public void setServer(String host,
int proto) throws rpc_err
- When HTTP protocol is used, and the servlet/CGI is a proxy to
a real RPC server, call this function to set the hostname of
the real server and protocol to use for it. Note: the servlet/CGI may perform translation
of the hostname.
- Parameters:
- host - Remote server hostname
- proto - Ask the proxy to use a particular protocol
- See Also:
- RpcProxyServlet
call_proc0
public void call_proc0() throws rpc_err
- Ping the RPC by calling procedure 0
connect
public boolean connect() throws rpc_err
- Connect to the RPC server
setAuth
public void setAuth(Auth a)
- Set authentication
getAuth
public Auth getAuth()
call
public void call(int proc,
XDT inarg,
XDT outarg) throws rpc_err
- Make an RPC call via the underlying RPC client handle.
Normally, one does not use this low level function, but
use the jrpcgen generated RPC client interface instead.
- Parameters:
- proc - Procecure number of the RPC
- inarg - Input argument
- outarg - Output which holds the results from the server
close
public boolean close()
- Close the RPC connection
getClient
public RPCClient getClient()
- Returns:
- The underlying RPCClient object
setClient
public void setClient(RPCClient c)
- Set the underlying client handle to a bound RPCClient object
setTimeout
public void setTimeout(int timeout)
- Set the timeout value (in milliseconds) for the RPC calls
All Packages Class Hierarchy This Package Previous Next Index