|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.sun.rpc.Connection
public abstract class Connection
Sets up a connection to the server using either UDP or TCP as determined by the subclass. This class also handles the connection caching.
ConnectSocket
,
ConnectDatagram
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
int |
port
|
java.lang.String |
server
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
Connection(java.lang.String server,
int port,
java.lang.String proto,
int maxSize)
Construct a new connection to a specified server and port using protocol proto with a reply buffer of size maxsize. |
Method Summary | |
---|---|
static Connection |
getCache(java.lang.String server,
int port,
java.lang.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()
|
java.lang.String |
toString()
Return information about the connection |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.String server
public int port
Constructor Detail |
---|
public Connection(java.lang.String server, int port, java.lang.String proto, int maxSize)
server
- The hostname of the serverport
- The port number on the serverMethod Detail |
---|
public static Connection getCache(java.lang.String server, int port, java.lang.String proto)
server
- The hostname of the serverport
- The port number on the serverproto
- The connection type: "tcp" or "udp"public static void putCache(Connection conn)
The
- connection to be cachedpublic java.lang.String toString()
toString
in class java.lang.Thread
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |