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


Java ChannelState.INTEREST_OPS属性代码示例

本文整理汇总了Java中org.jboss.netty.channel.ChannelState.INTEREST_OPS属性的典型用法代码示例。如果您正苦于以下问题:Java ChannelState.INTEREST_OPS属性的具体用法?Java ChannelState.INTEREST_OPS怎么用?Java ChannelState.INTEREST_OPS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.jboss.netty.channel.ChannelState的用法示例。


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

示例1: handleUpstream

/**
 * <p>
 * {@inheritDoc}
 * </p>
 * <p>
 * Overriden to log ChannelStateEvents if they have a state other than
 * {@link ChannelState#INTEREST_OPS}, i. e. OPEN, BOUND, CONNECTED.
 * </p>
 * 
 * @param ctx
 *            the context object for this handler
 * @param e
 *            the upstream event to process or intercept
 */
@Override
public void handleUpstream(final ChannelHandlerContext ctx, final ChannelEvent e) throws Exception {
	if (e instanceof ChannelStateEvent) {
		ChannelStateEvent stateEvent = (ChannelStateEvent) e;
		if (stateEvent.getState() != ChannelState.INTEREST_OPS) {
			log.info(e.toString());
			if (stateEvent.getState() == ChannelState.CONNECTED && stateEvent.getValue() == null) {
				// Remove channel from container when client disconnects
				channelContainer.removeChannel(e.getChannel());
			}
		}

	}
	super.handleUpstream(ctx, e);
}
 
开发者ID:mgm-tp,项目名称:perfload-core,代码行数:29,代码来源:ServerHandler.java

示例2: handleUpstream

@Override
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception {
    if(e instanceof ChannelStateEvent && ((ChannelStateEvent) e).getState() != ChannelState.INTEREST_OPS) {
        LOG.debug(e.toString());
    }
    super.handleUpstream(ctx, e);
}
 
开发者ID:ShifuML,项目名称:guagua,代码行数:7,代码来源:NettyMasterCoordinator.java

示例3: handleUpstream

/**
 * <p>
 * {@inheritDoc}
 * </p>
 * <p>
 * Overriden to log ChannelStateEvents if they have a state other than
 * {@link ChannelState#INTEREST_OPS}, i. e. OPEN, BOUND, CONNECTED.
 * </p>
 * 
 * @param ctx
 *            the context object for this handler
 * @param e
 *            the upstream event to process or intercept
 */
@Override
public void handleUpstream(final ChannelHandlerContext ctx, final ChannelEvent e) throws Exception {
	if (e instanceof ChannelStateEvent && ((ChannelStateEvent) e).getState() != ChannelState.INTEREST_OPS) {
		log.info(e.toString());
	}
	super.handleUpstream(ctx, e);
}
 
开发者ID:mgm-tp,项目名称:perfload-core,代码行数:21,代码来源:ClientHandler.java


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