Commits

Ning Sun committed 61e9f61

add executor to mina

  • Participants
  • Parent commits dc06cc2

Comments (0)

Files changed (1)

File src/gefr/backends/mina.py

 from org.apache.mina.core.service import IoHandlerAdapter
 from org.apache.mina.core.buffer import IoBuffer
 from org.apache.mina.filter.codec import ProtocolCodecFilter, ProtocolCodecFactory, ProtocolEncoderAdapter, CumulativeProtocolDecoder
+from org.apache.mina.filter.executor import ExecutorFilter
 
 from StringIO import StringIO
 
         self.handler = HttpHandler(self.app)
         self.acceptor = NioSocketAcceptor()
         self.acceptor.getFilterChain().addLast("protocol", ProtocolCodecFilter(HttpCodecFactory()))
+        self.acceptor.getFilterChain().addLast("executor", ExecutorFilter()); 
         self.acceptor.setHandler(self.handler)
         self.acceptor.setReuseAddress(True)
         self.acceptor.bind(InetSocketAddress(self.host, self.port))