Mercurial > hg > RemoteEditor > REPSessionManager
view rep/handler/REPHandlerImpl.java @ 148:6a5fe529b192
*** empty log message ***
author | pin |
---|---|
date | Thu, 28 Aug 2008 00:11:30 +0900 |
parents | 0bf7f8d0f5f7 |
children | bbd2801d8ce0 |
line wrap: on
line source
package rep.handler; import java.nio.channels.SelectionKey; import rep.REPCommand; import rep.SessionManager; import rep.channel.ChannelSimulator; import rep.channel.REPSocketChannel; import rep.channel.SelectionKeySimulator; public class REPHandlerImpl implements REPHandler { private SessionManager manager; public REPHandlerImpl(SessionManager manager) { this.manager = manager; } public void handle(SelectionKeySimulator key) { REPSocketChannel<REPCommand> channel = (REPSocketChannel<REPCommand>) key.channel(); REPCommand packet = channel.read(); REPCommand command = packet; manager.manage(channel, command); } public void handle(SelectionKey key) { // TODO Auto-generated method stub } }