public class TelnetServer extends TelnetStateThing implements Runnable
| Modifier and Type | Method and Description |
|---|---|
void |
_write(byte[] ar,
int off,
int len) |
void |
_write(int ch)
Called to dump data from outputstream and such..
|
void |
addCommandHandler(ITelnetCommandHandler tch)
Adds a command handler.
|
static TelnetServer |
createServer(int port)
Creates a new Telnet server.
|
protected void |
executeTelnetCommand(TelnetPrintWriter tpw,
String command)
Calls a command handler for a given (session, command) to get it
executed.
|
static void |
main(String[] args) |
static void |
registerTelnetCommand(ITelnetCommandHandler tch) |
void |
run()
This is the server's thread.
|
protected void |
sessionClosed(TelnetSession ts)
Called to remove a session that was closed (due to error or normal
circumstances) from this server's tables.
|
static void |
startTelnetServer(int port)
Called to start the telnet server.
|
void |
wall(String msg)
Sends a single string to ALL clients.
|
getState, getStateString, inState, setStatepublic static TelnetServer createServer(int port) throws Exception
Exceptionpublic void addCommandHandler(ITelnetCommandHandler tch)
protected void executeTelnetCommand(TelnetPrintWriter tpw, String command)
public void run()
protected void sessionClosed(TelnetSession ts)
public void wall(String msg)
public void _write(int ch)
public void _write(byte[] ar,
int off,
int len)
public static void main(String[] args)
public static void startTelnetServer(int port)
public static void registerTelnetCommand(ITelnetCommandHandler tch)
Copyright © 2017 etc.to. All rights reserved.