Examples of RegisterClientCommand


Examples of org.apache.qpid.disttest.message.RegisterClientCommand

    public void sendRegistrationMessage()
    {
        Command command;
        try
        {
            command = new RegisterClientCommand(_clientName, _instructionQueue.getQueueName());
        }
        catch (final JMSException e)
        {
            throw new DistributedTestException(e);
        }
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

    private void sendRegistration(final String clientId) throws JMSException
    {
        final MessageProducer registrationProducer = _session.createProducer(_controllerQueue);

        final Command command = new RegisterClientCommand(clientId, _clientQueue.getQueueName());
        final Message registrationMessage = JmsMessageAdaptor.commandToMessage(_session, command);
        registrationProducer.send(registrationMessage);
        LOGGER.debug("sent registrationMessage: " + registrationMessage);
    }
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

        }
    }

    public void testClientSendsRegistrationMessage() throws Exception
    {
        final RegisterClientCommand regClientCommand = _controllerQueue.getNext();

        assertNotNull("Client must have a non-null name", regClientCommand.getClientName());
        assertEquals("Unexpected client name", _clientJmsDelegate.getClientName(), regClientCommand.getClientName());
        assertNotNull("Client queue name should not be null", regClientCommand.getClientQueueName());
    }
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

        assertNotNull("Client queue name should not be null", regClientCommand.getClientQueueName());
    }

    public void testClientSendsCommandResponses() throws Exception
    {
        final RegisterClientCommand registrationCommand = _controllerQueue.getNext();
        createClientQueueProducer(registrationCommand);

        sendCommandToClient(new NoOpCommand());

        final Response responseCommand = _controllerQueue.getNext();
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

    public void testClientCanBeStoppedViaCommand() throws Exception
    {
        assertEquals("Expected client to be in STARTED state", ClientState.READY, _client.getState());

        final RegisterClientCommand registrationCommand = _controllerQueue.getNext();
        createClientQueueProducer(registrationCommand);

        final Command stopClientCommand = new StopClientCommand();
        sendCommandToClient(stopClientCommand);
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

    public void testClientCanCreateTestConnection() throws Exception
    {
        assertEquals("Unexpected number of test connections", 0, _clientJmsDelegate.getNoOfTestConnections());

        final RegisterClientCommand registration = _controllerQueue.getNext();
        createClientQueueProducer(registration);

        final CreateConnectionCommand createConnectionCommand = new CreateConnectionCommand();
        createConnectionCommand.setConnectionName("newTestConnection");
        createConnectionCommand.setConnectionFactoryName("connectionfactory");
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

    public void testClientCanCreateTestSession() throws Exception
    {
        assertEquals("Unexpected number of test sessions", 0, _clientJmsDelegate.getNoOfTestSessions());

        final RegisterClientCommand registration = _controllerQueue.getNext();
        createClientQueueProducer(registration);

        final CreateConnectionCommand createConnectionCommand = new CreateConnectionCommand();
        createConnectionCommand.setConnectionName("newTestConnection");
        createConnectionCommand.setConnectionFactoryName("connectionfactory");
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

        _clientJmsDelegate = new ClientJmsDelegate(_context);
        _client = new Client(_clientJmsDelegate);
        _client.start();

        final RegisterClientCommand registrationCommand = _controllerQueue.getNext();
        createClientQueueProducer(registrationCommand);

        createTestConnection(TEST_CONNECTION_NAME);
        createTestSession(TEST_CONNECTION_NAME, TEST_SESSION_NAME);
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

        }
    }

    public void testRegisterClient()
    {
        RegisterClientCommand command = new RegisterClientCommand(CLIENT1_REGISTERED_NAME, "dummy");
        _controller.registerClient(command);

        verify(_clientRegistry).registerClient(CLIENT1_REGISTERED_NAME);
        verify(_respondingJmsDelegate).registerClient(command);
View Full Code Here

Examples of org.apache.qpid.disttest.message.RegisterClientCommand

    public void sendRegistrationMessage()
    {
        Command command;
        try
        {
            command = new RegisterClientCommand(_clientName, _instructionQueue.getQueueName());
        }
        catch (final JMSException e)
        {
            throw new DistributedTestException(e);
        }
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.