Package org.apache.qpid.disttest.message

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


    {
        Collection<String> registeredClients = _clientRegistry.getClients();

        LOGGER.info("Stopping all clients");
        _stopClientsResponseLatch = new CountDownLatch(registeredClients.size());
        Command command = new StopClientCommand();
        for (final String clientName : registeredClients)
        {
            _jmsDelegate.sendCommandToClient(clientName, command);
        }
View Full Code Here


        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);

        _client.waitUntilStopped(1000);

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

    public void testProcessInstructionVisitsCommandAndResponds() throws Exception
    {
        // has to be declared to be of supertype Command otherwise Mockito verify()
        // refers to wrong method
        final Command command = new StopClientCommand();
        _client.processInstruction(command);

        verify(_visitor).visit(command);
        verify(_delegate).sendResponseMessage(isA(Response.class));
    }
View Full Code Here

        _visitor = new ClientCommandVisitor(_client, _delegate);
    }

    public void testStopClient()
    {
        StopClientCommand command = new StopClientCommand();
        _visitor.visit(command);
        verify(_client).stop();
    }
View Full Code Here

    {
        Collection<String> registeredClients = _clientRegistry.getClients();

        LOGGER.info("Stopping all clients");
        _stopClientsResponseLatch = new CountDownLatch(registeredClients.size());
        Command command = new StopClientCommand();
        for (final String clientName : registeredClients)
        {
            _jmsDelegate.sendCommandToClient(clientName, command);
        }
View Full Code Here

    public void testProcessInstructionVisitsCommandAndResponds() throws Exception
    {
        // has to be declared to be of supertype Command otherwise Mockito verify()
        // refers to wrong method
        final Command command = new StopClientCommand();
        _client.processInstruction(command);

        verify(_visitor).visit(command);
        verify(_delegate).sendResponseMessage(isA(Response.class));
    }
View Full Code Here

        _visitor = new ClientCommandVisitor(_client, _delegate);
    }

    public void testStopClient()
    {
        StopClientCommand command = new StopClientCommand();
        _visitor.visit(command);
        verify(_client).stop();
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.message.StopClientCommand

Copyright © 2018 www.massapicom. 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.