|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.khelekore.rnio.impl.SocketHandlerBase<T>
public abstract class SocketHandlerBase<T extends SelectableChannel>
A socket handler that never times out and always runs on the selector thread.
Field Summary | |
---|---|
NioHandler |
nioHandler
|
T |
sc
|
Long |
timeout
|
Constructor Summary | |
---|---|
SocketHandlerBase(T sc,
NioHandler nioHandler,
Long timeout)
|
Method Summary | |
---|---|
void |
closed()
Signal that the channel has been closed. |
String |
getDescription()
Returns the class name. |
Long |
getTimeout()
Will return null to indicate no timeout on accepts. |
void |
timeout()
Handle timeouts. |
boolean |
useSeparateThread()
Will always run on the selector thread so return false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final T extends SelectableChannel sc
public final NioHandler nioHandler
public final Long timeout
Constructor Detail |
---|
public SocketHandlerBase(T sc, NioHandler nioHandler, Long timeout)
sc
- the channel to handlenioHandler
- the NioHandlertimeout
- the timeout in millis, may be null if no timeout
is wanted.Method Detail |
---|
public Long getTimeout()
getTimeout
in interface SocketChannelHandler
public String getDescription()
getDescription
in interface SocketChannelHandler
public boolean useSeparateThread()
useSeparateThread
in interface SocketChannelHandler
public void timeout()
timeout
in interface SocketChannelHandler
public void closed()
SocketChannelHandler
closed
in interface SocketChannelHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |