private void switchToFactorial(ChannelHandlerContext ctx) {
ChannelPipeline p = ctx.pipeline();
p.addLast("decoder", new BigIntegerDecoder());
p.addLast("encoder", new NumberEncoder());
p.addLast("handler", new FactorialServerHandler());
p.removeAndForward(this);
}