|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.gedeon.telnetservice.TelnetService
public final class TelnetService
The service's main daemon component is the Telnet Service. It is configured by the integrating environment at setup/ initialization phase. Refer to the Introduction to Telnet Service for an overview of this service.
Field Summary | |
---|---|
protected TreeMap<Integer,TelnetServiceExtension> |
actionListenerFactories
The provider telnet user action listener factories, those will be picked by event distribution priority |
protected fr.gedeon.telnetservice.OutputFormatMainHandlerImpl |
outputFormat
|
protected TreeMap<Integer,TelnetServiceExtension> |
promptDecoratorFactories
|
protected LinkedList<TelnetServiceExtension> |
registeredExtensions
|
protected ServerSocket |
serverSocket
The server socket that is waiting for incoming connections |
protected Thread |
thread
The current thread, also the running flag: the runnable runs while it is not null |
Constructor Summary | |
---|---|
TelnetService()
Default constructor, does nothing |
Method Summary | |
---|---|
void |
connectionEstablished(SessionState sessionState)
Notification that the session has just been established |
void |
connectionLost(SessionState sessionState)
Notification that the session has just been lost |
int |
getBindPort()
Retreive the current bind port |
Iterator<Session> |
getSessionsIterator()
|
boolean |
isRunning()
|
void |
registerExtension(TelnetServiceExtension serviceExtension)
|
void |
run()
Main service loop, while running accept connections and start Session s |
void |
setBindPort(int bindPort)
Set the bind port. |
void |
start()
Start the service. |
void |
stop()
Stop the service asap. |
void |
unregisterAllExtensions()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Thread thread
protected ServerSocket serverSocket
protected LinkedList<TelnetServiceExtension> registeredExtensions
protected TreeMap<Integer,TelnetServiceExtension> actionListenerFactories
protected TreeMap<Integer,TelnetServiceExtension> promptDecoratorFactories
protected fr.gedeon.telnetservice.OutputFormatMainHandlerImpl outputFormat
Constructor Detail |
---|
public TelnetService()
Method Detail |
---|
public void unregisterAllExtensions()
public void registerExtension(TelnetServiceExtension serviceExtension)
public Iterator<Session> getSessionsIterator()
public int getBindPort()
public void setBindPort(int bindPort)
bindPort
- the desired bind portpublic boolean isRunning()
public void start() throws TelnetServiceStartException
TelnetServiceStartException
public void stop()
public void run()
Session
s
run
in interface Runnable
public void connectionEstablished(SessionState sessionState)
SessionListener
connectionEstablished
in interface SessionListener
sessionState
- the current session statepublic void connectionLost(SessionState sessionState)
SessionListener
connectionLost
in interface SessionListener
sessionState
- the current session state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |