public abstract class Connection extends Thread
ConnectionManager,
ConnectionDataThread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
Connection(ThreadGroup tcg,
ConnectionData cd)
Constructs a TelnetConnection by invoking its parent constructor
and setting of various members.
Subsequently instantiates the whole i/o subsystem, negotiating telnet protocol level options etc. |
| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(ConnectionListener cl)
Method that registers a ConnectionListener with the
Connection instance.
|
void |
close()
Closes the connection and its underlying i/o and network
resources.
|
protected abstract void |
doClose() |
protected abstract void |
doRun() |
ConnectionData |
getConnectionData()
Method to access the associated connection data.
|
boolean |
isActive()
Returns if a connection has been closed.
|
void |
processConnectionEvent(ConnectionEvent ce)
Method called by the io subsystem to pass on a
"low-level" event.
|
void |
removeConnectionListener(ConnectionListener cl)
Method that removes a ConnectionListener from the
Connection instance.
|
void |
run()
Method overloaded to implement following behaviour:
On first entry, retrieve an instance of the configured
login shell from the ShellManager and run it.
|
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, toString, yieldpublic Connection(ThreadGroup tcg, ConnectionData cd)
tcg - ThreadGroup that this instance is running in.cd - ConnectionData instance containing all vital information
of this connection.ConnectionDatapublic void run()
public ConnectionData getConnectionData()
ConnectionDatapublic void close()
public boolean isActive()
public void addConnectionListener(ConnectionListener cl)
cl - ConnectionListener to be registered.ConnectionListenerpublic void removeConnectionListener(ConnectionListener cl)
cl - ConnectionListener to be removed.ConnectionListenerpublic void processConnectionEvent(ConnectionEvent ce)
ce - ConnectionEvent to be processed.ConnectionEventCopyright © 2020. All rights reserved.