本文整理汇总了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;
}
};
}
示例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();
}
};
}
示例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;
}
示例4: ProtoPipelineFactory
import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
public ProtoPipelineFactory(ChannelUpstreamHandler handlerFactory,
MessageLite defaultInstance) {
this.handler = handlerFactory;
this.defaultInstance = defaultInstance;
}
示例5: createCoreHandler
import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler createCoreHandler() {
return coreHandler;
}
示例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());
}
示例7: createCoreHandler
import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler createCoreHandler() {
return coreHandler;
}
示例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);
}
示例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);
}
}
示例10: finalChannelUpstreamHandler
import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler finalChannelUpstreamHandler() {
return null;
}
示例11: finalChannelUpstreamHandler
import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
@Override
protected ChannelUpstreamHandler finalChannelUpstreamHandler() {
// TODO Auto-generated method stub
return null;
}
示例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);
}
示例13: createCoreHandler
import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
protected abstract ChannelUpstreamHandler createCoreHandler();
示例14: finalChannelUpstreamHandler
import org.jboss.netty.channel.ChannelUpstreamHandler; //导入依赖的package包/类
abstract protected ChannelUpstreamHandler finalChannelUpstreamHandler();