net.sf.jbaobab.io
Class SocketHandler<P>
java.lang.Object
net.sf.jbaobab.io.SocketHandler<P>
- All Implemented Interfaces:
- ChannelHandler<SocketChannel>
public class SocketHandler<P>
- extends Object
- implements ChannelHandler<SocketChannel>
A ChannelHandler
that handles SocketCore
.
- Author:
- Oakyoon Cha
- See Also:
SocketCore
,
PacketHandler
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketHandler
public SocketHandler(SocketCore<P> core,
PacketHandler<P> handler)
prepare
public void prepare(SocketChannel channel,
ChannelManager<SocketChannel> receiver,
ChannelManager<SocketChannel> sender)
- Specified by:
prepare
in interface ChannelHandler<SocketChannel>
receive
public int receive()
throws IOException
- Specified by:
receive
in interface ChannelHandler<SocketChannel>
- Throws:
IOException
send
public int send()
throws IOException
- Specified by:
send
in interface ChannelHandler<SocketChannel>
- Throws:
IOException
connected
public final void connected()
- Specified by:
connected
in interface ChannelHandler<SocketChannel>
disconnected
public final void disconnected()
- Specified by:
disconnected
in interface ChannelHandler<SocketChannel>