|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--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.
Inner Class Summary | |
(package private) class |
TelnetEcho.Echo
The worker thread. |
Field Summary | |
(package private) java.net.ServerSocket |
ss
The server cocket which accepts connections |
Fields inherited from class java.lang.Thread |
contextClassLoader,
daemon,
eetop,
group,
inheritedAccessControlContext,
MAX_PRIORITY,
MIN_PRIORITY,
name,
NORM_PRIORITY,
priority,
single_step,
stillborn,
stopThreadPermission,
target,
threadInitNumber,
threadQ,
values |
Constructor Summary | |
(package private) |
TelnetEcho()
|
Method Summary | |
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 |
void |
run()
Open server socket and wait for incoming connections |
int |
timeToWait()
Don't wait if onServiceStop does not return. |
Methods inherited from class java.lang.Thread |
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
java.net.ServerSocket ss
Constructor Detail |
TelnetEcho()
Method Detail |
public void onServiceStop()
public int timeToWait()
public void run()
public static void main(java.lang.String[] argv)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |