com.sun.rpc
Class Connection
public abstract class Connection
extends Thread
Sets up a connection to the server using
either UDP or TCP as determined by the
subclass.
This class also handles the connection caching.
Connection(String server, int port, String proto, int maxSize) - Construct a new connection to a specified server
and port using protocol proto with a
reply buffer of size maxsize.
|
static Connection | getCache(String server, int port, String proto) - Get a cached connection for the specified server, port and protocol
|
static void | putCache(Connection conn) - Stash a new connection in the cache
|
void | run()
|
String | toString() - Return information about the connection
|
server
public String server
Connection
public Connection(String server,
int port,
String proto,
int maxSize)
Construct a new connection to a specified server
and port using protocol proto with a
reply buffer of size maxsize.
server
- The hostname of the serverport
- The port number on the server
getCache
public static Connection getCache(String server,
int port,
String proto)
Get a cached connection for the specified server, port and protocol
server
- The hostname of the serverport
- The port number on the serverproto
- The connection type: "tcp" or "udp"
putCache
public static void putCache(Connection conn)
Stash a new connection in the cache
toString
public String toString()
Return information about the connection