java类org.jboss.netty.channel.ChannelUpstreamHandler的实例源码

ExtensibleNettyServer.java 文件源码 项目:NioSmtpClient 阅读 34 收藏 0 点赞 0 评论 0
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;
    }
  };
}
AbstractConfigurableAsyncServer.java 文件源码 项目:James 阅读 30 收藏 0 点赞 0 评论 0
@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();
        }

    };
}
IMAPServer.java 文件源码 项目:James 阅读 33 收藏 0 点赞 0 评论 0
@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;
}
ProtoPipelineFactory.java 文件源码 项目:incubator-tajo 阅读 33 收藏 0 点赞 0 评论 0
public ProtoPipelineFactory(ChannelUpstreamHandler handlerFactory,
    MessageLite defaultInstance) {
  this.handler = handlerFactory;
  this.defaultInstance = defaultInstance;
}
ProtoPipelineFactory.java 文件源码 项目:tajo-cdh 阅读 126 收藏 0 点赞 0 评论 0
public ProtoPipelineFactory(ChannelUpstreamHandler handlerFactory,
    MessageLite defaultInstance) {
  this.handler = handlerFactory;
  this.defaultInstance = defaultInstance;
}
POP3Server.java 文件源码 项目:James 阅读 26 收藏 0 点赞 0 评论 0
@Override
protected ChannelUpstreamHandler createCoreHandler() {
    return coreHandler; 
}
LMTPServer.java 文件源码 项目:James 阅读 35 收藏 0 点赞 0 评论 0
@Override
protected ChannelUpstreamHandler createCoreHandler() {
    SMTPProtocol protocol = new SMTPProtocol(getProtocolHandlerChain(), lmtpConfig, new ProtocolLoggerAdapter(getLogger()));
    return new SMTPChannelUpstreamHandler(protocol, getLogger());
}
SMTPServer.java 文件源码 项目:James 阅读 25 收藏 0 点赞 0 评论 0
@Override
protected ChannelUpstreamHandler createCoreHandler() {
    return coreHandler;
}
ChannelAllCoverageWrapper.java 文件源码 项目:netty-isdn-transport 阅读 33 收藏 0 点赞 0 评论 0
public ChannelAllCoverageWrapper(ChannelHandler handler) {
    super();
    this.handler = handler;
    this.downstream = (handler instanceof ChannelDownstreamHandler);
    this.upstream = (handler instanceof ChannelUpstreamHandler);
}
ChannelAllCoverageWrapper.java 文件源码 项目:netty-isdn-transport 阅读 29 收藏 0 点赞 0 评论 0
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception {
    if (upstream) {
        ((ChannelUpstreamHandler) handler).handleUpstream(ctx, e);
    }
}
LeaderServer.java 文件源码 项目:feluca 阅读 27 收藏 0 点赞 0 评论 0
@Override
protected ChannelUpstreamHandler finalChannelUpstreamHandler() {
    return null;
}
WorkerServer.java 文件源码 项目:feluca 阅读 29 收藏 0 点赞 0 评论 0
@Override
protected ChannelUpstreamHandler finalChannelUpstreamHandler() {
    // TODO Auto-generated method stub
    return null;
}
Controller.java 文件源码 项目:smartenit 阅读 35 收藏 0 点赞 0 评论 0
/**
 * 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);
}
Controller.java 文件源码 项目:archived-net-virt-platform 阅读 39 收藏 0 点赞 0 评论 0
/**
 * 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);
}
Controller.java 文件源码 项目:floodlight-qosmanager 阅读 37 收藏 0 点赞 0 评论 0
/**
 * 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);
}
Controller.java 文件源码 项目:floodlight-nfv 阅读 34 收藏 0 点赞 0 评论 0
/**
 * 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);
}
Controller.java 文件源码 项目:floodlight-oss 阅读 25 收藏 0 点赞 0 评论 0
/**
 * 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);
}
Controller.java 文件源码 项目:my-floodlight 阅读 35 收藏 0 点赞 0 评论 0
/**
 * 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);
}
Controller.java 文件源码 项目:FL_HAND 阅读 29 收藏 0 点赞 0 评论 0
/**
 * 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);
}
Controller.java 文件源码 项目:sdn-project 阅读 33 收藏 0 点赞 0 评论 0
/**
 * 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);
}
AbstractConfigurableAsyncServer.java 文件源码 项目:James 阅读 29 收藏 0 点赞 0 评论 0
protected abstract ChannelUpstreamHandler createCoreHandler();
BaseNioServer.java 文件源码 项目:feluca 阅读 34 收藏 0 点赞 0 评论 0
abstract protected ChannelUpstreamHandler finalChannelUpstreamHandler();


问题


面经


文章

微信
公众号

扫码关注公众号