|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--Server
Name: Server
Desc: This object is designed to listen on a specific port for incomming
connections from a nsjc client. One object is spawned per port by the nsjsd
application.
This object basically waits for a connection. When it receives one it will
attempt to identify the host. It does this by checking the alias records
and the host records in the system. If it doesn't find the host/alias in
the list of records then it will refuse the connection. If it accepts the connection
then it will launch a Connection object to handle the transmission of the data.
It is important to note that this object won't actually start listening for
connections until it is 'started'. Because this object extends Threads, call
the 'run' method. That will launch an asynchronise thread and start the Server object
listening on the port.
author: viaggi@nietzsche.net
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
Server(int intPort,
nsjsd nsjParent)
Name: Server Desc: The constructor of the Server object. |
Method Summary | |
void |
fail(java.lang.Exception exc,
java.lang.String strMsg)
Name: fail Desc: Calls the nsjsd parent's fail method. |
java.lang.Thread |
getThread()
Name: get Thread Desc: This function will return the running thread as an object. |
void |
run()
Name: run Desc: This function is an over-riding method for implementing Threads. |
void |
writelog(java.lang.String strMsg)
Name: write log Desc: Calls the nsjsd parent's write log method. |
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 |
Constructor Detail |
public Server(int intPort, nsjsd nsjParent)
intPort
- --> int, the port to listen onnsjParent
- --> najsd, the Parent which hold the configuration informationMethod Detail |
public java.lang.Thread getThread()
public void writelog(java.lang.String strMsg)
strMsg
- --> String, the message to write to the log filepublic void fail(java.lang.Exception exc, java.lang.String strMsg)
exc
- --> Exception, the Exception to report onstrMsg
- --> String, the message to reportpublic 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 |