Mercurial > hg > RemoteEditor > REPSessionManager
view rep/handler/REPHandlerImpl.java @ 217:4deaaaa6354e
*** empty log message ***
author | kono |
---|---|
date | Sun, 31 Aug 2008 00:26:35 +0900 |
parents | 4d9b32666ed2 |
children | 827c439d0da4 |
line wrap: on
line source
package rep.handler; import java.io.IOException; import rep.REPCommand; import rep.REPCommandPacker; import rep.SessionManager; import rep.channel.REPSelectionKey; import rep.channel.REPSocketChannel; public class REPHandlerImpl implements REPHandler { private SessionManager manager; public REPHandlerImpl(int sid, SessionManager manager) { this.manager = manager; } @SuppressWarnings("unchecked") public void handle(REPSelectionKey<REPCommand> key) throws IOException { REPSocketChannel<REPCommand> channel = (REPSocketChannel<REPCommand>) key.accept(new REPCommandPacker()); REPCommand command = channel.read(); manager.manage(channel, command); } }