Examples of AmqpPort


Examples of org.apache.qpid.server.model.port.AmqpPort

    public void testCompareTo() throws Exception
    {
        final Broker<?> broker = mock(Broker.class);
        when(broker.getContextValue(eq(Long.class), eq(Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT))).thenReturn(0l);

        AmqpPort amqpPort = mock(AmqpPort.class);
        when(amqpPort.getContextValue(eq(Integer.class), eq(AmqpPort.PORT_MAX_MESSAGE_SIZE))).thenReturn(AmqpPort.DEFAULT_MAX_MESSAGE_SIZE);

        ServerConnection connection = new ServerConnection(1, broker, amqpPort, Transport.TCP);
        connection.setVirtualHost(_virtualHost);
        ServerSession session1 = new ServerSession(connection, new ServerSessionDelegate(),
                new Binary(getName().getBytes()), 0);
View Full Code Here

Examples of org.apache.qpid.server.model.port.AmqpPort

    public void testOverlargeMessageTest() throws Exception
    {
        final Broker<?> broker = mock(Broker.class);
        when(broker.getContextValue(eq(Long.class), eq(Broker.CHANNEL_FLOW_CONTROL_ENFORCEMENT_TIMEOUT))).thenReturn(0l);

        AmqpPort port = mock(AmqpPort.class);
        when(port.getContextValue(eq(Integer.class), eq(AmqpPort.PORT_MAX_MESSAGE_SIZE))).thenReturn(1024);
        ServerConnection connection = new ServerConnection(1, broker, port, Transport.TCP);
        connection.setVirtualHost(_virtualHost);
        final List<Method> invokedMethods = new ArrayList<>();
        ServerSession session = new ServerSession(connection, new ServerSessionDelegate(),
                                                   new Binary(getName().getBytes()), 0)
View Full Code Here

Examples of org.apache.qpid.server.model.port.AmqpPort

    public static InternalTestProtocolSession createProtocolSession(String hostName) throws Exception
    {
        VirtualHostImpl virtualHost = createVirtualHost(hostName);

        AmqpPort port = mock(AmqpPort.class);
        when(port.getContextValue(eq(Integer.class), eq(AmqpPort.PORT_MAX_MESSAGE_SIZE))).thenReturn(AmqpPort.DEFAULT_MAX_MESSAGE_SIZE);
        return new InternalTestProtocolSession(virtualHost, createBrokerMock(), port);
    }
View Full Code Here

Examples of org.apache.qpid.server.model.port.AmqpPort

    {
        super.setUp();
        BrokerTestHelper.setUp();
        _virtualHost = BrokerTestHelper.createVirtualHost(getTestName());
        _broker = BrokerTestHelper.createBrokerMock();
        AmqpPort port = mock(AmqpPort.class);
        when(port.getContextValue(eq(Integer.class), eq(AmqpPort.PORT_MAX_MESSAGE_SIZE))).thenReturn(AmqpPort.DEFAULT_MAX_MESSAGE_SIZE);

        _protocolSession = new InternalTestProtocolSession(_virtualHost, _broker, port)
        {
            @Override
            public void writeReturn(MessagePublishInfo messagePublishInfo,
View Full Code Here

Examples of org.apache.qpid.server.model.port.AmqpPort

    public void testCompareTo() throws Exception
    {
        AMQChannel channel1 = new AMQChannel(_protocolSession, 1, _virtualHost.getMessageStore());

        AmqpPort port = mock(AmqpPort.class);
        when(port.getContextValue(eq(Integer.class), eq(AmqpPort.PORT_MAX_MESSAGE_SIZE))).thenReturn(AmqpPort.DEFAULT_MAX_MESSAGE_SIZE);
        // create a channel with the same channelId but on a different session
        AMQChannel channel2 = new AMQChannel(new InternalTestProtocolSession(_virtualHost, _broker, port), 1, _virtualHost.getMessageStore());
        assertFalse("Unexpected compare result", channel1.compareTo(channel2) == 0);
        assertEquals("Unexpected compare result", 0, channel1.compareTo(channel1));
    }
View Full Code Here

Examples of org.apache.qpid.server.model.port.AmqpPort

    }

    public void testOverlargeMessage() throws Exception
    {

        AmqpPort port = mock(AmqpPort.class);
        when(port.getContextValue(eq(Integer.class), eq(AmqpPort.PORT_MAX_MESSAGE_SIZE))).thenReturn(1024);
        final List<AMQDataBlock> frames = new ArrayList<>();
        _protocolSession = new InternalTestProtocolSession(_virtualHost, _broker, port)
        {
            @Override
            public synchronized void writeFrame(final AMQDataBlock frame)
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.