Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Activate
- @Modified
- protected void activate(BundleContext bundleContext) throws Exception {
- if(VIMAPConfigurationUtil.enabled()) {
- if (_log.isInfoEnabled()) {
- _log.info("DBG SMTP initServer");
- }
- _nioSocketAcceptor = new NioSocketAcceptor();
- _nioSocketAcceptor.setReuseAddress(true);
- DefaultIoFilterChainBuilder chain =
- _nioSocketAcceptor.getFilterChain();
- addSSLSupport(chain);
- chain.addLast("logger", new VIMAPLogger());
- chain.addLast("codec", new ProtocolCodecFilter(new
- VIMAPCodeFactory(Charset.forName(StringPool.UTF8))));
- _nioSocketAcceptor.setHandler(new DefaultSMTPIoHandler());
- SocketAddress socketAddress = new InetSocketAddress(
- VIMAPConfigurationUtil.smtpBindPort());
- _nioSocketAcceptor.bind(socketAddress);
- }else {
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement