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; } }; }
@Override protected ChannelPipelineFactory createPipelineFactory(ChannelGroup group) { return new AbstractExecutorAwareChannelPipelineFactory(getTimeout(), connectionLimit, connPerIP, group, enabledCipherSuites, getExecutionHandler()) { @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(); } }; }
@Override protected ChannelUpstreamHandler createCoreHandler() { ImapChannelUpstreamHandler coreHandler; Encryption secure = getEncryption(); if (secure!= null && secure.isStartTLS()) { coreHandler = new ImapChannelUpstreamHandler(hello, processor, encoder, getLogger(), compress, plainAuthDisallowed, secure.getContext(), getEnabledCipherSuites()); } else { coreHandler = new ImapChannelUpstreamHandler(hello, processor, encoder, getLogger(), compress, plainAuthDisallowed); } return coreHandler; }
public ProtoPipelineFactory(ChannelUpstreamHandler handlerFactory, MessageLite defaultInstance) { this.handler = handlerFactory; this.defaultInstance = defaultInstance; }
@Override protected ChannelUpstreamHandler createCoreHandler() { return coreHandler; }
@Override protected ChannelUpstreamHandler createCoreHandler() { SMTPProtocol protocol = new SMTPProtocol(getProtocolHandlerChain(), lmtpConfig, new ProtocolLoggerAdapter(getLogger())); return new SMTPChannelUpstreamHandler(protocol, getLogger()); }
public ChannelAllCoverageWrapper(ChannelHandler handler) { super(); this.handler = handler; this.downstream = (handler instanceof ChannelDownstreamHandler); this.upstream = (handler instanceof ChannelUpstreamHandler); }
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception { if (upstream) { ((ChannelUpstreamHandler) handler).handleUpstream(ctx, e); } }
@Override protected ChannelUpstreamHandler finalChannelUpstreamHandler() { return null; }
@Override protected ChannelUpstreamHandler finalChannelUpstreamHandler() { // TODO Auto-generated method stub return null; }
/** * Return a new channel handler for processing a switch connections * @param state The channel state object for the connection * @return the new channel handler */ protected ChannelUpstreamHandler getChannelHandler(OFChannelState state) { return new OFChannelHandler(state); }
protected abstract ChannelUpstreamHandler createCoreHandler();
abstract protected ChannelUpstreamHandler finalChannelUpstreamHandler();