Package org.rhq.enterprise.communications.command.impl.identify

Examples of org.rhq.enterprise.communications.command.impl.identify.IdentifyCommand


     *
     * @throws Throwable
     */
    private boolean ping(RemoteCommunicator comm) {
        boolean ok = true; // assume we can ping; on error, we'll set this to false
        IdentifyCommand id_cmd = new IdentifyCommand();
        this.agent.getClientCommandSender().preprocessCommand(id_cmd);
        try {
            CommandResponse response = comm.sendWithoutCallbacks(id_cmd);
            // there is a special case when we might get a response back but it should be considered "server down".
            // that is: when the server replies with a NotProcessedException response
View Full Code Here


    /**
     * @see AgentPromptCommand#execute(AgentMain, String[])
     */
    public boolean execute(AgentMain agent, String[] args) {
        Command command = new IdentifyCommand();
        PrintWriter out = agent.getOut();

        try {
            ClientCommandSender sender = agent.getClientCommandSender();

View Full Code Here

        assert agent2.getConfiguration().getClientSenderSecuritySocketProtocol().equals("SSL");

        assert !agent1.getConfiguration().isClientSenderSecurityServerAuthMode();
        assert agent2.getConfiguration().isClientSenderSecurityServerAuthMode();

        IdentifyCommand command = new IdentifyCommand();
        CommandResponse cmdresponse;

        cmdresponse = agent1.getClientCommandSender().sendSynch(command);
        assert cmdresponse.isSuccessful() : "Should have been able to send - agent1 does not need to auth the server: "
            + cmdresponse;
View Full Code Here

        assert agent1.getServiceContainer().getConfiguration().getConnectorSecurityClientAuthMode().equals(
            SSLSocketBuilder.CLIENT_AUTH_MODE_NEED);
        assert agent2.getServiceContainer().getConfiguration().getConnectorSecurityClientAuthMode().equals(
            SSLSocketBuilder.CLIENT_AUTH_MODE_WANT);

        IdentifyCommand command = new IdentifyCommand();
        CommandResponse cmdresponse;

        cmdresponse = agent1.getClientCommandSender().sendSynch(command);
        assert cmdresponse.isSuccessful() : "Should have been able to send - agent2 only 'wants' to auth clients, but is not required to: "
            + cmdresponse;
View Full Code Here

        assert agent2.getServiceContainer().getConfiguration().getConnectorSecuritySocketProtocol().equals("SSL");

        assert agent1.getConfiguration().getClientSenderSecuritySocketProtocol().equals("SSL");
        assert agent2.getConfiguration().getClientSenderSecuritySocketProtocol().equals("SSL");

        IdentifyCommand command = new IdentifyCommand();
        CommandResponse cmdresponse;
        IdentifyCommandResponse response;

        cmdresponse = agent1.getClientCommandSender().sendSynch(command);
        assert cmdresponse.isSuccessful() : "Failed to send command from agent1 to agent2: " + cmdresponse;
View Full Code Here

        assert agent2.getServiceContainer().getConfiguration().getConnectorSecuritySocketProtocol().equals("TLS");

        assert agent1.getConfiguration().getClientSenderSecuritySocketProtocol().equals("TLS");
        assert agent2.getConfiguration().getClientSenderSecuritySocketProtocol().equals("SSL");

        IdentifyCommand command = new IdentifyCommand();
        CommandResponse cmdresponse;
        IdentifyCommandResponse response;

        cmdresponse = agent1.getClientCommandSender().sendSynch(command);
        assert cmdresponse.isSuccessful() : "Failed to send command from agent1 to agent2: " + cmdresponse;
View Full Code Here

    @Test(enabled = ENABLE_TESTS)
    public void testSendMessage() throws Exception {
        AgentMain agent1 = m_agent1Test.createAgent(true);
        AgentMain agent2 = m_agent2Test.createAgent(true);

        IdentifyCommand command = new IdentifyCommand();
        IdentifyCommandResponse response;

        response = (IdentifyCommandResponse) agent1.getClientCommandSender().sendSynch(command);
        assert response.isSuccessful() : "Failed to send command from agent1 to agent2";
        assert new InvokerLocator(response.getIdentification().getInvokerLocator()).getPort() == agent2
View Full Code Here

        assert server_metrics2.getNumberSuccessfulCommandsReceived() == 0;
        assert server_metrics2.getNumberFailedCommandsReceived() == 0;
        assert server_metrics2.getNumberTotalCommandsReceived() == 0;
        assert server_metrics2.getAverageExecutionTimeReceived() == 0;

        IdentifyCommand command = new IdentifyCommand();
        IdentifyCommandResponse response;

        response = (IdentifyCommandResponse) agent1.getClientCommandSender().sendSynch(command);
        assert response.isSuccessful() : "Failed to send command from agent1 to agent2";
        assert new InvokerLocator(response.getIdentification().getInvokerLocator()).getPort() == agent2
View Full Code Here

        assert agent1.getServiceContainer().getConfiguration().getConnectorSecurityClientAuthMode().equals(
            SSLSocketBuilder.CLIENT_AUTH_MODE_NEED);
        assert agent2.getServiceContainer().getConfiguration().getConnectorSecurityClientAuthMode().equals(
            SSLSocketBuilder.CLIENT_AUTH_MODE_NEED);

        IdentifyCommand command = new IdentifyCommand();
        CommandResponse cmdresponse;
        IdentifyCommandResponse response;

        cmdresponse = agent1.getClientCommandSender().sendSynch(command);
        assert cmdresponse.isSuccessful() : "Failed to send command from agent1 to agent2: " + cmdresponse;
View Full Code Here

            Thread.sleep(5000);
            assert !agent1.getClientCommandSender().isSending() : "we should have been able to turn off the InitializeCallback/connectAgent should therefore not have triggered our listener and started the sender";
            assert agent2.getClientCommandSender().isSending() : "Should have already started the sender";

            // our canary-in-the-mine is the sending mode, the sender goes into sending mode when it detects the server
            IdentifyCommand command = new IdentifyCommand();
            CommandResponse response;

            response = agent2.getClientCommandSender().sendSynch(command);
            assert response.isSuccessful() : "agent2 should have been able to send to agent1: " + response;
            assert agent1.getClientCommandSender().isSending() : "agent2 message should have started agent1 sender";
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.communications.command.impl.identify.IdentifyCommand

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.