netbula.ORPC

Class InetRPCClient

Known Direct Subclasses:
ClientTCP, ClientUDP

public abstract class InetRPCClient
extends RPCClient

Abstract base class of all RPC client classes.

Field Summary

Fields inherited from class netbula.ORPC.RPCClient

IPPROTO_TCP, IPPROTO_UDP

Constructor Summary

InetRPCClient()
InetRPCClient(InetAddress servAdd, int proto, int port, int prog, int ver)
Construct an RPC client binding to a server specified by the parameters.
InetRPCClient(String host, int proto, int port, int prog, int ver)
Construct an RPC client binding to a server specified by the parameters.

Method Summary

abstract boolean
close()
Close the connection to the RPC server.
abstract boolean
connect()
Connect to the RPC server.
int
getserver_port()
Get server's port number.
void
setServer(String host, int proto)
Closes existing connection and connect to another server.

Methods inherited from class netbula.ORPC.RPCClient

call, call_proc0, close, connect, finalize, getAuth, getRpcProgramNumber, getRpcProtocol, getRpcVersionNumber, setAuth, setConnectionTimeout, setRpcProgramNumber, setRpcProtocol, setRpcVersionNumber, setServer, setTimeout

Constructor Details

InetRPCClient

public InetRPCClient()

InetRPCClient

public InetRPCClient(InetAddress servAdd,
                     int proto,
                     int port,
                     int prog,
                     int ver)
            throws rpc_err
Construct an RPC client binding to a server specified by the parameters. If port is 0, Portmapper will be queried to obtained the port number.
Parameters:
servAdd - RPC server's internet address
proto - Protocol
port - Server port. If this is 0, Portmapper will be queried to obtained the port number.
prog - Server program number
ver - Server version number

InetRPCClient

public InetRPCClient(String host,
                     int proto,
                     int port,
                     int prog,
                     int ver)
            throws rpc_err
Construct an RPC client binding to a server specified by the parameters.
Parameters:
proto - Protocol
port - Server port. If this is 0, Portmapper will be queried to obtained the port number.
prog - Server program number
ver - Server version number

Method Details

close

public abstract boolean close()
Close the connection to the RPC server.
Overrides:
close in interface RPCClient

connect

public abstract boolean connect()
            throws rpc_err
Connect to the RPC server.
Overrides:
connect in interface RPCClient

getserver_port

public int getserver_port()
Get server's port number. Call this function on a connected client object only.
Returns:
Server's port

setServer

public void setServer(String host,
                      int proto)
            throws rpc_err
Closes existing connection and connect to another server.
Overrides:
setServer in interface RPCClient
Parameters:
host - Server hostname
proto - Protocol