netbula.ORPC

Class ClientUDP


public class ClientUDP
extends InetRPCClient

Field Summary

Fields inherited from class netbula.ORPC.RPCClient

IPPROTO_TCP, IPPROTO_UDP

Constructor Summary

ClientUDP()
ClientUDP(InetAddress inetAddress, int prog, int ver)
ClientUDP(InetAddress inetAddress, int prog, int ver, int port)
ClientUDP(String host, int prog, int ver)
ClientUDP(String hostname, int prog, int ver, int port)

Method Summary

boolean
bcast(InetAddress baddr, int prog, int vers, int proc, XDT args, XDT res, ReplyHandler handler)
Broadcast RPC.
boolean
bcast(String baddr, int prog, int vers, int proc, XDT args, XDT res, ReplyHandler handler)
void
call(int proc, XDT inarg, XDT outarg)
Call an RPC procedure.
boolean
close()
Close the connection to the RPC server.
boolean
connect()
For UDP the connect function initialize certain internal data needed for the subsequent RPC calls.
int
setRetryTimeout(int reto)
Set retry timeout to reto milliseconds if reto >0

Methods inherited from class netbula.ORPC.InetRPCClient

close, connect, getserver_port, setServer

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

ClientUDP

public ClientUDP()

ClientUDP

public ClientUDP(InetAddress inetAddress,
                 int prog,
                 int ver)
            throws rpc_err

ClientUDP

public ClientUDP(InetAddress inetAddress,
                 int prog,
                 int ver,
                 int port)
            throws rpc_err

ClientUDP

public ClientUDP(String host,
                 int prog,
                 int ver)
            throws rpc_err

ClientUDP

public ClientUDP(String hostname,
                 int prog,
                 int ver,
                 int port)
            throws rpc_err

Method Details

bcast

public boolean bcast(InetAddress baddr,
                     int prog,
                     int vers,
                     int proc,
                     XDT args,
                     XDT res,
                     ReplyHandler handler)
            throws rpc_err
Broadcast RPC.

bcast

public boolean bcast(String baddr,
                     int prog,
                     int vers,
                     int proc,
                     XDT args,
                     XDT res,
                     ReplyHandler handler)
            throws rpc_err

call

public void call(int proc,
                 XDT inarg,
                 XDT outarg)
            throws rpc_err
Call an RPC procedure. This is an abstract method to be implemented for different RPC transports.
Overrides:
call in interface RPCClient
Parameters:
proc - Procedure number
inarg - Input argument to be sent over
outarg - Output argument to hold results from server

close

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

connect

public boolean connect()
            throws rpc_err
For UDP the connect function initialize certain internal data needed for the subsequent RPC calls.
Overrides:
connect in interface InetRPCClient

setRetryTimeout

public int setRetryTimeout(int reto)
Set retry timeout to reto milliseconds if reto >0
Parameters:
reto - New retry timeout
Returns:
previous retry timeout value