org.apache.log4j.net

Class TelnetAppender.SocketHandler

Enclosing Class:
TelnetAppender

protected class TelnetAppender.SocketHandler
extends Thread

The SocketHandler class is used to accept connections from clients. It is threaded so that clients can connect/disconnect asynchronously.

Constructor Summary

SocketHandler(int port)

Method Summary

void
close()
make sure we close all network connections when this handler is destroyed.
void
finalize()
void
run()
Continually accepts client connections.
void
send(String message)
sends a message to each of the clients in telnet-friendly output.

Constructor Details

SocketHandler

public SocketHandler(int port)
            throws IOException

Method Details

close

public void close()
make sure we close all network connections when this handler is destroyed.

finalize

public void finalize()

run

public void run()
Continually accepts client connections. Client connections are refused when MAX_CONNECTIONS is reached.

send

public void send(String message)
sends a message to each of the clients in telnet-friendly output.

Copyright 2000-2007 Apache Software Foundation.