Mercurial > hg > RemoteEditor > REPSessionManager
view rep/Forwarder.java @ 317:c83a3faec487
*** empty log message ***
author | kono |
---|---|
date | Tue, 07 Oct 2008 21:48:31 +0900 |
parents | 77f443f6dc9f |
children | dc57e24ea3df |
line wrap: on
line source
package rep; import rep.channel.REPLogger; import rep.channel.REPSocketChannel; import rep.handler.PacketSet; public class Forwarder { int eid; // unique id in a session REPSocketChannel<REPCommand> myChannel; // REPCommands we sent to the next editor final int limit=100; REPLogger ns = REPLogger.singleton(); SessionManager manager; public Forwarder(SessionManager manager) { this.manager = manager; } public int getEID() { return eid; } public void setEID(int eid) { this.eid = eid; } public void send(REPCommand command) { manager.addWriteQueue(new PacketSet(myChannel, null, command)); } public REPSocketChannel<REPCommand> getChannel() { return myChannel; } public void setChannel(REPSocketChannel<REPCommand> channel) { myChannel = channel; } }