1 package org.sapia.ubik.net.nio.acceptor; 2 3 import java.nio.channels.Channel ; 4 import java.nio.channels.Selector ; 5 6 import org.sapia.ubik.net.nio.Dispatcher; 7 import org.sapia.ubik.net.nio.SelectionQueue; 8 import org.sapia.ubik.net.nio.ChannelManager; 9 import org.sapia.ubik.net.nio.util.ByteBufferPool; 10 import org.sapia.ubik.util.Debug; 11 import org.sapia.ubik.util.NullDebug; 12 13 28 class AcceptorConfig { 29 SelectionQueue queue; 30 Selector selector; 31 Channel server; 32 ChannelManager manager; 33 Dispatcher dispatcher; 34 Debug debug = new NullDebug(); 35 ByteBufferPool pool = new ByteBufferPool(); 36 StateHandler[] handlers; 37 38 AcceptorConfig(ChannelManager manager, Dispatcher disp) { 39 this.manager = manager; 40 this.dispatcher = disp; 41 } 42 43 void init(Channel server, Selector selector, StateHandler[] handlers) { 44 this.server = server; 45 this.selector = selector; 46 this.handlers = handlers; 47 this.queue = new SelectionQueue(manager, selector); 48 } 49 50 } 51 | Popular Tags |