Examples of sendUpstream()


Examples of org.jboss.netty.channel.ChannelHandlerContext.sendUpstream()

    {
        NettyThriftDecoder decoder = new NettyThriftDecoder();
        ChannelHandlerContext ctx = EasyMock.createMock(ChannelHandlerContext.class);
        Channel channel = EasyMock.createMock(Channel.class);
        EasyMock.expect(ctx.getChannel()).andReturn(channel);
        ctx.sendUpstream(EasyMock.anyObject(ChannelEvent.class));
        EasyMock.replay(ctx, channel);
        try {
            Object rand = new Object();
            Object obj = decoder.decode(ctx, channel, rand);
            Assert.assertEquals(rand, obj);
View Full Code Here

Examples of org.jboss.netty.channel.ChannelPipeline.sendUpstream()

      pipeline.addLast("frameDecoder", new DelimiterBasedFrameDecoder(65536, true, true, delims.toArray(new ChannelBuffer[delims.size()])));
      //pipeline.addLast("logger", new LoggingHandler(InternalLogLevel.INFO));
      pipeline.addLast("stringDecoder", new StringDecoder(CharsetUtil.UTF_8));
      pipeline.addLast("exec-handler", execHandler);
      pipeline.addLast("submission-handler", submissionHandler);
      pipeline.sendUpstream(new UpstreamMessageEvent(channel, buffer, channel.getRemoteAddress()));
      return null;
    }
    if(log.isDebugEnabled()) log.debug("Switching to HTTP");
    ctx.getPipeline().remove(this);
    return buffer.readBytes(buffer.readableBytes());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.