当前位置: 首页>>代码示例>>Java>>正文


Java ChannelUpstreamHandler类代码示例

本文整理汇总了Java中org.jboss.netty.channel.ChannelUpstreamHandler的典型用法代码示例。如果您正苦于以下问题:Java ChannelUpstreamHandler类的具体用法?Java ChannelUpstreamHandler怎么用?Java ChannelUpstreamHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ChannelUpstreamHandler类属于org.jboss.netty.channel包,在下文中一共展示了ChannelUpstreamHandler类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createCoreHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
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;
    }
  };
}
 
开发者ID:HubSpot,项目名称:NioSmtpClient,代码行数:15,代码来源:ExtensibleNettyServer.java

示例2: createPipelineFactory

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@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();
        }

    };
}
 
开发者ID:twachan,项目名称:James,代码行数:32,代码来源:AbstractConfigurableAsyncServer.java

示例3: createCoreHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@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;
}
 
开发者ID:twachan,项目名称:James,代码行数:12,代码来源:IMAPServer.java

示例4: ProtoPipelineFactory

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
public ProtoPipelineFactory(ChannelUpstreamHandler handlerFactory,
    MessageLite defaultInstance) {
  this.handler = handlerFactory;
  this.defaultInstance = defaultInstance;
}
 
开发者ID:apache,项目名称:incubator-tajo,代码行数:6,代码来源:ProtoPipelineFactory.java

示例5: createCoreHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler createCoreHandler() {
    return coreHandler; 
}
 
开发者ID:twachan,项目名称:James,代码行数:5,代码来源:POP3Server.java

示例6: createCoreHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler createCoreHandler() {
    SMTPProtocol protocol = new SMTPProtocol(getProtocolHandlerChain(), lmtpConfig, new ProtocolLoggerAdapter(getLogger()));
    return new SMTPChannelUpstreamHandler(protocol, getLogger());
}
 
开发者ID:twachan,项目名称:James,代码行数:6,代码来源:LMTPServer.java

示例7: createCoreHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler createCoreHandler() {
    return coreHandler;
}
 
开发者ID:twachan,项目名称:James,代码行数:5,代码来源:SMTPServer.java

示例8: ChannelAllCoverageWrapper

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
public ChannelAllCoverageWrapper(ChannelHandler handler) {
    super();
    this.handler = handler;
    this.downstream = (handler instanceof ChannelDownstreamHandler);
    this.upstream = (handler instanceof ChannelUpstreamHandler);
}
 
开发者ID:rmarins,项目名称:netty-isdn-transport,代码行数:7,代码来源:ChannelAllCoverageWrapper.java

示例9: handleUpstream

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception {
    if (upstream) {
        ((ChannelUpstreamHandler) handler).handleUpstream(ctx, e);
    }
}
 
开发者ID:rmarins,项目名称:netty-isdn-transport,代码行数:6,代码来源:ChannelAllCoverageWrapper.java

示例10: finalChannelUpstreamHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler finalChannelUpstreamHandler() {
	return null;
}
 
开发者ID:lgnlgn,项目名称:feluca,代码行数:5,代码来源:LeaderServer.java

示例11: finalChannelUpstreamHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler finalChannelUpstreamHandler() {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:lgnlgn,项目名称:feluca,代码行数:6,代码来源:WorkerServer.java

示例12: getChannelHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:smartenit-eu,项目名称:smartenit,代码行数:9,代码来源:Controller.java

示例13: createCoreHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
protected abstract ChannelUpstreamHandler createCoreHandler(); 
开发者ID:twachan,项目名称:James,代码行数:2,代码来源:AbstractConfigurableAsyncServer.java

示例14: finalChannelUpstreamHandler

import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
abstract protected ChannelUpstreamHandler finalChannelUpstreamHandler(); 
开发者ID:lgnlgn,项目名称:feluca,代码行数:2,代码来源:BaseNioServer.java


注:本文中的org.jboss.netty.channel.ChannelUpstreamHandler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。