org.jboss.netty.channel.ChannelUpstreamHandler Java Examples
The following examples show how to use
org.jboss.netty.channel.ChannelUpstreamHandler.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExtensibleNettyServer.java From NioSmtpClient with Apache License 2.0 | 5 votes |
protected ChannelUpstreamHandler createCoreHandler() { // Supporting chunking is difficult because James offers a line-oriented interface. // By saving the Netty channel into James' SMTPSession, we can add a Netty handler // that can intercept the BDAT message body before James attempts to parse it // into a series of lines. return new BasicChannelUpstreamHandler(protocol, secure) { @Override protected ProtocolSession createSession(ChannelHandlerContext ctx) throws Exception { ProtocolSession session = super.createSession(ctx); session.setAttachment(NETTY_CHANNEL, ctx.getChannel(), State.Connection); return session; } }; }
Example #2
Source File: NettyServer.java From james-project with Apache License 2.0 | 5 votes |
@Override protected ChannelPipelineFactory createPipelineFactory(ChannelGroup group) { return new AbstractSSLAwareChannelPipelineFactory( getTimeout(), maxCurConnections, maxCurConnectionsPerIP, group, secure != null ? secure.getEnabledCipherSuites() : null, eHandler, getFrameHandlerFactory(), hashedWheelTimer) { @Override protected ChannelUpstreamHandler createHandler() { return coreHandler; } @Override protected boolean isSSLSocket() { return getSSLContext() != null && secure != null && !secure.isStartTLS(); } @Override protected SSLContext getSSLContext() { if (secure != null) { return secure.getContext(); } else { return null; } } }; }
Example #3
Source File: AbstractConfigurableAsyncServer.java From james-project with Apache License 2.0 | 5 votes |
@Override protected ChannelPipelineFactory createPipelineFactory(ChannelGroup group) { return new AbstractExecutorAwareChannelPipelineFactory(getTimeout(), connectionLimit, connPerIP, group, enabledCipherSuites, getExecutionHandler(), getFrameHandlerFactory(), timer) { @Override protected SSLContext getSSLContext() { if (encryption == null) { return null; } else { return encryption.getContext(); } } @Override protected boolean isSSLSocket() { return encryption != null && !encryption.isStartTLS(); } @Override protected ChannelUpstreamHandler createHandler() { return AbstractConfigurableAsyncServer.this.createCoreHandler(); } @Override protected ConnectionCountHandler getConnectionCountHandler() { return AbstractConfigurableAsyncServer.this.getConnectionCountHandler(); } }; }
Example #4
Source File: ManageSieveServer.java From james-project with Apache License 2.0 | 5 votes |
@Override protected ChannelUpstreamHandler createCoreHandler() { return new ManageSieveChannelUpstreamHandler(manageSieveProcessor, getEncryption() == null ? null : getEncryption().getContext(), getEnabledCipherSuites(), isSSL(), LOGGER); }
Example #5
Source File: IMAPServer.java From james-project with Apache License 2.0 | 5 votes |
@Override protected ChannelUpstreamHandler createCoreHandler() { ImapChannelUpstreamHandler coreHandler; Encryption secure = getEncryption(); if (secure != null && secure.isStartTLS()) { coreHandler = new ImapChannelUpstreamHandler(hello, processor, encoder, compress, plainAuthDisallowed, secure.getContext(), getEnabledCipherSuites(), imapMetrics); } else { coreHandler = new ImapChannelUpstreamHandler(hello, processor, encoder, compress, plainAuthDisallowed, imapMetrics); } return coreHandler; }
Example #6
Source File: NettyServer.java From james-project with Apache License 2.0 | 4 votes |
protected ChannelUpstreamHandler createCoreHandler() { return new BasicChannelUpstreamHandler(new ProtocolMDCContextFactory.Standard(), protocol, secure); }
Example #7
Source File: POP3Server.java From james-project with Apache License 2.0 | 4 votes |
@Override protected ChannelUpstreamHandler createCoreHandler() { return coreHandler; }
Example #8
Source File: LMTPServer.java From james-project with Apache License 2.0 | 4 votes |
@Override protected ChannelUpstreamHandler createCoreHandler() { SMTPProtocol protocol = new SMTPProtocol(getProtocolHandlerChain(), lmtpConfig); return new SMTPChannelUpstreamHandler(protocol, lmtpMetrics); }
Example #9
Source File: SMTPServer.java From james-project with Apache License 2.0 | 4 votes |
@Override protected ChannelUpstreamHandler createCoreHandler() { return coreHandler; }
Example #10
Source File: ProtoPipelineFactory.java From incubator-tajo with Apache License 2.0 | 4 votes |
public ProtoPipelineFactory(ChannelUpstreamHandler handlerFactory, MessageLite defaultInstance) { this.handler = handlerFactory; this.defaultInstance = defaultInstance; }
Example #11
Source File: AbstractChannelPipelineFactory.java From james-project with Apache License 2.0 | 2 votes |
/** * Create the core {@link ChannelUpstreamHandler} to use * * @return coreHandler */ protected abstract ChannelUpstreamHandler createHandler();
Example #12
Source File: AbstractConfigurableAsyncServer.java From james-project with Apache License 2.0 | votes |
protected abstract ChannelUpstreamHandler createCoreHandler();