public void setPort(int port) {
this.port = port;
}
public void start() throws IOException {
NioSocketAcceptor acceptor = new NioSocketAcceptor();
DefaultIoFilterChainBuilder filterChainBuilder = new DefaultIoFilterChainBuilder();
//filterChainBuilder.addLast("executorFilter", new OrderedThreadPoolExecutor());
filterChainBuilder.addLast("xmppCodec", new ProtocolCodecFilter(new XMPPProtocolCodecFactory()));
filterChainBuilder.addLast("loggingFilter", new StanzaLoggingFilter());
acceptor.setFilterChainBuilder(filterChainBuilder);
XmppIoHandlerAdapter adapter = new XmppIoHandlerAdapter();
adapter.setServerRuntimeContext(serverRuntimeContext);
acceptor.setHandler(adapter);
acceptor.setReuseAddress(true);
acceptor.bind(new InetSocketAddress(port));
this.acceptor = acceptor;
}