|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
ucr.core.ConnectionManager
ucr.core.IncomingConnectionManager
Manager for incomming connections
Field Summary | |
protected ConnectionData |
connectionData
|
protected ConnectionList |
connectionList
|
private HostCache |
hostCache
|
protected Router |
router
|
private java.net.ServerSocket |
serverSocket
|
protected boolean |
shutdown
|
private static int |
SOCKET_RETRY_COUNT
|
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
(package private) |
IncomingConnectionManager(Router router,
ConnectionList connectionList,
ConnectionData connectionData,
HostCache hostCache)
Constructs the incoming connection manager |
Method Summary | |
void |
closeServerSocket()
|
(package private) java.net.ServerSocket |
createServerSocket()
Creates a ServerSocket using an alternate port if needed |
(package private) ConnectionList |
getConnectionList()
Gets the list of connections |
(package private) int |
getDesiredConnectionCount()
Get the desired connection count |
(package private) boolean |
isShutdown()
Check if the manager is shut down |
void |
openServerSocket()
|
void |
run()
Main processing loop for serversocket |
(package private) void |
setDesiredConnectionCount(int count)
Set the desired connection count |
(package private) void |
shutdown()
Closes all connections and stops processing |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final int SOCKET_RETRY_COUNT
private java.net.ServerSocket serverSocket
private HostCache hostCache
protected ConnectionList connectionList
protected boolean shutdown
protected ConnectionData connectionData
protected Router router
Constructor Detail |
IncomingConnectionManager(Router router, ConnectionList connectionList, ConnectionData connectionData, HostCache hostCache) throws java.io.IOException
Method Detail |
public void openServerSocket()
public void closeServerSocket()
java.net.ServerSocket createServerSocket() throws java.io.IOException
ServerSocket
using an alternate port if needed
java.io.IOException
- if socket creation failspublic void run()
void setDesiredConnectionCount(int count)
count
- desired connection countint getDesiredConnectionCount()
void shutdown()
boolean isShutdown()
ConnectionList getConnectionList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |