Examples of received()


Examples of com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received()

            public void received(Channel channel, Object message) throws RemotingException {
                Assert.assertEquals(requestdata, message);
            }
        };
        HeaderExchangeHandler hexhandler = new HeaderExchangeHandler(exhandler);
        hexhandler.received(mchannel, request);
    }
   
    @Test
    public void test_received_request_twoway() throws RemotingException{
        final Person requestdata = new Person("charles");
View Full Code Here

Examples of com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received()

            public void received(Channel channel, Object message) throws RemotingException {
                Assert.fail();
            }
        };
        HeaderExchangeHandler hexhandler = new HeaderExchangeHandler(exhandler);
        hexhandler.received(mchannel, request);
        Assert.assertEquals(1, count.get());
    }
   
    @Test(expected = IllegalArgumentException.class)
    public void test_received_request_twoway_error_nullhandler() throws RemotingException{
View Full Code Here

Examples of com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received()

            public Object reply(ExchangeChannel channel, Object request) throws RemotingException {
                throw new BizException();
            }
        };
        HeaderExchangeHandler hexhandler = new HeaderExchangeHandler(exhandler);
        hexhandler.received(mchannel, request);
        Assert.assertEquals(1, count.get());
    }
   
    @Test
    public void test_received_request_twoway_error_reqeustBroken() throws RemotingException{
View Full Code Here

Examples of com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received()

                Assert.assertTrue(res.getErrorMessage().contains(BizException.class.getName()));
                count.incrementAndGet();
            }
        };
        HeaderExchangeHandler hexhandler = new HeaderExchangeHandler(new MockedExchangeHandler());
        hexhandler.received(mchannel, request);
        Assert.assertEquals(1, count.get());
    }
   
    @Test
    public void test_received_request_event_readonly() throws RemotingException{
View Full Code Here

Examples of com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received()

        request.setTwoWay(true);
        request.setEvent(Request.READONLY_EVENT);
       
        final Channel mchannel = new MockedChannel();
        HeaderExchangeHandler hexhandler = new HeaderExchangeHandler(new MockedExchangeHandler());
        hexhandler.received(mchannel, request);
        Assert.assertTrue(mchannel.hasAttribute(Constants.CHANNEL_ATTRIBUTE_READONLY_KEY));
    }
   
    @Test
    public void test_received_request_event_other_discard() throws RemotingException{
View Full Code Here

Examples of com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received()

            public void received(Channel channel, Object message) throws RemotingException {
                Assert.fail();
                throw new RemotingException(channel,"");
            }
        });
        hexhandler.received(mchannel, request);
    }

    private class BizException extends RuntimeException{
        private static final long serialVersionUID = 1L;
    }
View Full Code Here

Examples of com.sissi.protocol.message.Message.received()

   * @see com.sissi.pipeline.Input#input(com.sissi.context.JIDContext, com.sissi.protocol.Protocol)
   */
  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    Message message = Message.class.cast(protocol);
    return (message.getBody() != null && message.getBody().content()) || message.received();
  }
}
View Full Code Here

Examples of org.apache.qpid.protocol.ServerProtocolEngine.received()

            TestNetworkConnection conn = new TestNetworkConnection();
            engine.setNetworkConnection(conn, conn.getSender());
            assertEquals("ID did not increment as expected", expectedID, engine.getConnectionId());

            //actually feed in the AMQP header for this protocol version, and ensure the ID remains consistent
            engine.received(ByteBuffer.wrap(header));
            assertEquals("ID was not as expected following receipt of the AMQP version header", expectedID, engine.getConnectionId());

            previousId = expectedID;
            engine.closed();
        }
View Full Code Here

Examples of org.apache.qpid.protocol.ServerProtocolEngine.received()

            TestNetworkConnection conn = new TestNetworkConnection();
            engine.setNetworkConnection(conn, conn.getSender());
            assertEquals("ID did not increment as expected", expectedID, engine.getConnectionId());

            //actually feed in the AMQP header for this protocol version, and ensure the ID remains consistent
            engine.received(ByteBuffer.wrap(header));
            assertEquals("ID was not as expected following receipt of the AMQP version header", expectedID, engine.getConnectionId());

            previousId = expectedID;
        }
    }
View Full Code Here

Examples of org.apache.qpid.protocol.ServerProtocolEngine.received()

            TestNetworkConnection conn = new TestNetworkConnection();
            engine.setNetworkConnection(conn, conn.getSender());
            assertEquals("ID did not increment as expected", expectedID, engine.getConnectionId());

            //actually feed in the AMQP header for this protocol version, and ensure the ID remains consistent
            engine.received(ByteBuffer.wrap(header));
            assertEquals("ID was not as expected following receipt of the AMQP version header", expectedID, engine.getConnectionId());

            previousId = expectedID;
            engine.closed();
        }
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.