Package org.rhq.enterprise.communications.command

Examples of org.rhq.enterprise.communications.command.CommandResponse


        return (client != null) && client.isConnected();
    }

    public CommandResponse sendWithoutCallbacks(Command command) throws Throwable {
        // handle NotPermittedException in here
        CommandResponse ret_response = null;
        boolean retry;
        do {
            retry = false;
            ret_response = rawSend(command);
            Throwable exception = ret_response.getException();
            if (exception instanceof NotPermittedException) {
                long pause = ((NotPermittedException) exception).getSleepBeforeRetry();
                LOG.debug(CommI18NResourceKeys.COMMAND_NOT_PERMITTED, command, pause);
                retry = true;
                Thread.sleep(pause);
View Full Code Here


        return ret_response;
    }

    public CommandResponse sendWithoutInitializeCallback(Command command) throws Throwable {
        CommandResponse ret_response = null;
        boolean retry = false;

        do {
            try {
                ret_response = sendWithoutCallbacks(command);
View Full Code Here

    }

    public CommandResponse send(Command command) throws Throwable {
        // invoke our initialize callback - if our method returns a response, it means
        // the initialize callback had an error and we need to abort the sending of this command
        CommandResponse initializeErrorResponse = invokeInitializeCallbackIfNeeded(command);
        if (initializeErrorResponse != null) {
            return initializeErrorResponse;
        }

        return sendWithoutInitializeCallback(command);
View Full Code Here

     * @see    #invoke(InvocationRequest)
     * @see    #handleStream(InputStream, InvocationRequest)
     */
    private Object handleIncomingInvocationRequest(InputStream in, InvocationRequest invocation) {
        Command cmd = null;
        CommandResponse ret_response = null;

        long elapsed = 0L; // will be the time in ms that it took to invoked the command service if we did invoke it

        try {
            // get the subsystem - find the command service in this subsystem that will execute our command
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.communications.command.CommandResponse

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.