Fixed a wrong usage of ExecutionHandler in the example
This commit is contained in:
parent
8474026c92
commit
cac77a47b2
@ -37,17 +37,17 @@ import org.jboss.netty.handler.execution.ExecutionHandler;
|
||||
*/
|
||||
public class LocalServerPipelineFactory implements ChannelPipelineFactory {
|
||||
|
||||
private final Executor eventExecutor;
|
||||
private final ExecutionHandler executionHandler;
|
||||
|
||||
public LocalServerPipelineFactory(Executor eventExecutor) {
|
||||
this.eventExecutor = eventExecutor;
|
||||
executionHandler = new ExecutionHandler(eventExecutor);
|
||||
}
|
||||
|
||||
public ChannelPipeline getPipeline() throws Exception {
|
||||
final ChannelPipeline pipeline = Channels.pipeline();
|
||||
pipeline.addLast("decoder", new StringDecoder());
|
||||
pipeline.addLast("encoder", new StringEncoder());
|
||||
pipeline.addLast("executor", new ExecutionHandler(eventExecutor));
|
||||
pipeline.addLast("executor", executionHandler);
|
||||
pipeline.addLast("handler", new EchoCloseServerHandler());
|
||||
return pipeline;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user