juju.reattore.core.reactor
Interface ClientSocketHandler

All Superinterfaces:
Handler
All Known Implementing Classes:
HttpClientHandler, URLTester

public interface ClientSocketHandler
extends Handler

Callback interface related to a client socket channel. Called by the reactor when the socket state changes.


Method Summary
 boolean handleConnected()
          Called when the socket is initially connected.
 void handleError()
          Called when any error occurs on the attached socket.
 boolean handleReadable()
          Called when the attached socket has data available.
 boolean handleWritable()
          Called when the attached socket is ready to be written to.
 
Methods inherited from interface juju.reattore.core.reactor.Handler
getInterestOps
 

Method Detail

handleReadable

public boolean handleReadable()
                       throws java.io.IOException
Called when the attached socket has data available.

Returns:
true if processing has finished and this socket should be closed.
Throws:
java.io.IOException - if a fatal IO error occurred.

handleWritable

public boolean handleWritable()
                       throws java.io.IOException
Called when the attached socket is ready to be written to.

Returns:
true if processing has finished and this socket should be closed.
Throws:
java.io.IOException - if a fatal IO error occurred.

handleConnected

public boolean handleConnected()
                        throws java.io.IOException
Called when the socket is initially connected. This does not imply that the channel is readable or writable.

Returns:
true if processing has finished and this socket should be closed.
Throws:
java.io.IOException - if a fatal IO error occurred.

handleError

public void handleError()
Called when any error occurs on the attached socket. Does not distinguish between connection, transient, or fatal errors. The socket may not be usable.



Copyright © 2002-2003 Michael Hope. All Rights Reserved.