|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--amber.server.manager.connection.LoginThread
Thread to deal with the initial reception of login packets. This thread handles the incoming packets and initiates the ApplicationHandlers.
ConnectionManager,
ListenerThread| Field Summary | |
protected java.security.SecureRandom |
random
Secure random number generator used if the link is secure. |
protected Mutex |
waitForConnection
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
LoginThread(ConnectionManager parent,
int type,
int number)
Construct the thread, with it's parent class so it may pass back messages. |
|
| Method Summary | |
void |
addConnection(java.net.Socket socket,
int type)
This function adds a new socket connection to the thread for processing. |
long |
getLastActiveTime()
This indicates the last time that the thread was active. |
int |
getPendingConnectionCount()
This function returns the count of the number of connections the thread is currently handling. |
int |
getType()
Returns the type of listener this is. |
void |
run()
Main implementation function. |
void |
setType(int type)
Sets the type of listener this is. |
void |
terminate()
This function causes the flag to be set terminating this thread. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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 |
protected Mutex waitForConnection
protected java.security.SecureRandom random
| Constructor Detail |
public LoginThread(ConnectionManager parent,
int type,
int number)
parent - ConnectionManager parent object.type - int containing the type of listener this is. This matches
the constants in this class.certificate - RSAKey containing the encryption certificate. This
is required for secure connections.number - int thread number, used for logging purposes.| Method Detail |
public void addConnection(java.net.Socket socket,
int type)
addConnection in interface ConnectionReceiversocket - Socket which is the incoming connection.type - int defining the type of connection received. This value
corresponds to the constants defined in Listener.Listenerpublic void terminate()
public int getPendingConnectionCount()
public void run()
run in class java.lang.Threadpublic long getLastActiveTime()
public void setType(int type)
type - int type of listener. This must match the type constants
specified in the ListenerThread class.public int getType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||