com.maverick.nio
Interface SocketHandler

All Superinterfaces:
SelectorRegistrationListener
All Known Implementing Classes:
SocketConnection, SocketForwardingChannel

public interface SocketHandler
extends SelectorRegistrationListener

An interface used by the SelectorThread to notify an object of when a read or write event has occurred.

Author:
Lee David Painter

Method Summary
 int getInterestedOps()
          Returns the current operations the handler is interested in
 void initialize(ProtocolEngine engine, Daemon daemon)
          Initialize this socket with a ProtocolEngine and the current Daemon.
 boolean processReadEvent()
          The selector is ready to be read.
 boolean processWriteEvent()
          The selector is ready to be written to.
 void setThread(SelectorThread thread)
          Sets the selector thread this handler runs upon
 
Methods inherited from interface com.maverick.nio.SelectorRegistrationListener
registrationCompleted
 

Method Detail

initialize

public void initialize(ProtocolEngine engine,
                       Daemon daemon)
Initialize this socket with a ProtocolEngine and the current Daemon.

Parameters:
engine - ProtocolEngine
daemon - Daemon

processReadEvent

public boolean processReadEvent()
The selector is ready to be read.

Returns:
boolean indicating ??

processWriteEvent

public boolean processWriteEvent()
The selector is ready to be written to.

Returns:
boolean

getInterestedOps

public int getInterestedOps()
Returns the current operations the handler is interested in

Returns:
int

setThread

public void setThread(SelectorThread thread)
Sets the selector thread this handler runs upon

Parameters:
thread -


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.