net.sf.jbaobab.io
Class ExpirableSocketCore<P>
java.lang.Object
net.sf.jbaobab.io.ExpirableSocketCore<P>
- All Implemented Interfaces:
- ChannelCore<P>, SocketCore<P>
public class ExpirableSocketCore<P>
- extends Object
- implements SocketCore<P>
A SocketCore
that decorates enclosing SocketCore
with
expiration.
- Author:
- Oakyoon Cha
- See Also:
ReclaimableExpirer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpirableSocketCore
public ExpirableSocketCore(SocketCore<P> core,
long timeout)
prepare
public void prepare(SocketChannel channel,
ChannelManager<SocketChannel> receiver,
ChannelManager<SocketChannel> sender)
- Specified by:
prepare
in interface SocketCore<P>
channel
public SocketChannel channel()
- Specified by:
channel
in interface SocketCore<P>
protocol
public Protocol<P> protocol()
- Specified by:
protocol
in interface ChannelCore<P>
receive
public int receive(PacketHandler<P> handler)
throws IOException
- Specified by:
receive
in interface ChannelCore<P>
- Throws:
IOException
send
public int send()
throws IOException
- Specified by:
send
in interface ChannelCore<P>
- Throws:
IOException
shutdown
public void shutdown()
- Specified by:
shutdown
in interface ChannelCore<P>
schedulePacket
public void schedulePacket(P packet)
- Specified by:
schedulePacket
in interface ChannelCore<P>
scheduleShutdown
public void scheduleShutdown()
- Specified by:
scheduleShutdown
in interface ChannelCore<P>
track
public String track()
- Specified by:
track
in interface ChannelCore<P>