com.echomine.net
Interface SocketHandler

All Known Subinterfaces:
FileHandler, HandshakeableSocketHandler
All Known Implementing Classes:
AbstractFileHandler, BaseFileHandler, JabberProtocol, StringSocketHandler, StringSocketReaderHandler, StringSocketWriterHandler

public interface SocketHandler

Handler handles all connection details, including handshaking and data processing.


Method Summary
 void handle(alt.java.net.Socket socket)
          Handles the connection details, including handshaking and data processing.
 void shutdown()
          shuts down/closes the connection.
 void start()
          starts the connection.
 

Method Detail

handle

void handle(alt.java.net.Socket socket)
            throws java.io.IOException
Handles the connection details, including handshaking and data processing. The handler should NOT close the socket. Rather, it is up to the caller of this method to close the socket when all processing is done.

Throws:
java.io.IOException - when any processing error occurs

start

void start()
starts the connection. This will give the handler a chance to reset any information or create any instances before the handling begins.


shutdown

void shutdown()
shuts down/closes the connection. This is to give the handler an option to close the connection nicely and have a chance to do any cleanups before/after socket close.



Copyright © 2001-2005 Echomine. All Rights Reserved.