|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.roeschter.jsl.TelnetEcho
class TelnetEcho
A simple example for a java service. This is a simple echoing Telnet Server. It accepts telnet connections on port 23 and echos back every character typed.
Nested Class Summary | |
---|---|
(package private) class |
TelnetEcho.Echo
The worker thread. |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
(package private) java.net.ServerSocket |
ss
The server cocket which accepts connections |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
TelnetEcho()
|
Method Summary | |
---|---|
static void |
confirmRunning()
|
static void |
cont()
|
void |
debugDump(java.io.OutputStream out)
|
static void |
main(java.lang.String[] argv)
The main method called when the service starts. |
void |
onServiceStop()
Here the telnet server implements the Stopable interface On exit close the server cocket on port 23 |
static void |
paramtest(java.lang.String[] arg)
|
static void |
pause()
|
static int |
premain()
|
void |
run()
Open server socket and wait for incoming connections |
int |
timeToWait()
Don't wait if onServiceStop does not return. |
void |
write(java.io.OutputStream out,
java.lang.String s)
|
void |
wrkDir(java.io.OutputStream out)
|
Methods inherited from class java.lang.Thread |
---|
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, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.net.ServerSocket ss
Constructor Detail |
---|
TelnetEcho()
Method Detail |
---|
public void onServiceStop()
onServiceStop
in interface Stopable
public int timeToWait()
timeToWait
in interface Stopable
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void debugDump(java.io.OutputStream out)
public void wrkDir(java.io.OutputStream out)
public void write(java.io.OutputStream out, java.lang.String s)
public static void paramtest(java.lang.String[] arg)
public static void pause()
public static int premain()
public static void cont()
public static void confirmRunning()
public static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |