Gets the command result if any or tries to unmarshal String payload representation to an command result model.
@return
334758
private <T extends CommandResultType> T getCommandResult() {
        if (commandResult == null) {
            if (getPayload() instanceof String) {
                this.commandResult = (T) marshaller.unmarshal(new StringSource(getPayload(String.class)));
            }
        }

        return (T) commandResult;
    }
347166
public boolean processServletCommand()
        throws DBException
    {
        String strCommand = this.getProperty(DBParams.COMMAND);        // Display record
        if (strCommand == null)
            strCommand = Constants.BLANK;
        boolean bSuccess = false;
        if (this.getScreenField() instanceof BasePanel)
        {   // Always
            if (strCommand.equalsIgnoreCase(ThinMenuConstants.FIRST))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.FIRST_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.PREVIOUS))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.PREVIOUS_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.NEXT))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.NEXT_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.LAST))
                bSuccess = ((BasePanel)this.getScreenField()).onMove(DBConstants.LAST_RECORD);
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.SUBMIT))
                bSuccess = ((BasePanel)this.getScreenField()).onAdd();
            else if (strCommand.equalsIgnoreCase(ThinMenuConstants.DELETE))
                bSuccess = ((BasePanel)this.getScreenField()).onDelete();
            else
            { // Must have sent a user-defined command (send command to this screen)
                bSuccess = false;   // Too dangerous ((BasePanel)this.getScreenField()).handleCommand(strCommand, this.getScreenField(), false);
            }
        }
        return bSuccess;
    }
1204332
@Override
    public String getValue(ParsedCommandLine args) {
        try {
            return getValue(args, false);
        } catch (CommandFormatException e) {
            return null;
        }
    }
634402
public static String getFailureDescriptionAsString(final ModelNode result) {
        if (isSuccessfulOutcome(result)) {
            return "";
        }
        final String msg;
        if (result.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) {
            if (result.hasDefined(ClientConstants.OP)) {
                msg = String.format("Operation '%s' at address '%s' failed: %s", result.get(ClientConstants.OP), result.get(ClientConstants.OP_ADDR), result
                        .get(ClientConstants.FAILURE_DESCRIPTION));
            } else {
                msg = String.format("Operation failed: %s", result.get(ClientConstants.FAILURE_DESCRIPTION));
            }
        } else {
            msg = String.format("An unexpected response was found checking the deployment. Result: %s", result);
        }
        return msg;
    }
406412
public java.lang.String getOperation() {
    java.lang.Object ref = operation_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      operation_ = s;
      return s;
    }
  }
1000394
function(self, commands, result, callback) {
  // Base case when there are no more commands to serialize
  if (commands.length === 0) return callback(null, result);

  // Pop off the zeroth command and serialize it
  var thisCommand = commands.shift();
  var originalCommandBuffer = thisCommand.toBin();

  // Check whether we and the server have agreed to use a compressor
  if (self.options.agreedCompressor && !hasUncompressibleCommands(thisCommand)) {
    // Transform originalCommandBuffer into OP_COMPRESSED
    var concatenatedOriginalCommandBuffer = Buffer.concat(originalCommandBuffer);
    var messageToBeCompressed = concatenatedOriginalCommandBuffer.slice(MESSAGE_HEADER_SIZE);

    // Extract information needed for OP_COMPRESSED from the uncompressed message
    var originalCommandOpCode = concatenatedOriginalCommandBuffer.readInt32LE(12);

    // Compress the message body
    compress(self, messageToBeCompressed, function(err, compressedMessage) {
      if (err) return callback(err, null);

      // Create the msgHeader of OP_COMPRESSED
      var msgHeader = Buffer.alloc(MESSAGE_HEADER_SIZE);
      msgHeader.writeInt32LE(MESSAGE_HEADER_SIZE + 9 + compressedMessage.length, 0); // messageLength
      msgHeader.writeInt32LE(thisCommand.requestId, 4); // requestID
      msgHeader.writeInt32LE(0, 8); // responseTo (zero)
      msgHeader.writeInt32LE(opcodes.OP_COMPRESSED, 12); // opCode

      // Create the compression details of OP_COMPRESSED
      var compressionDetails = Buffer.alloc(9);
      compressionDetails.writeInt32LE(originalCommandOpCode, 0); // originalOpcode
      compressionDetails.writeInt32LE(messageToBeCompressed.length, 4); // Size of the uncompressed compressedMessage, excluding the MsgHeader
      compressionDetails.writeUInt8(compressorIDs[self.options.agreedCompressor], 8); // compressorID

      // Push the concatenation of the OP_COMPRESSED message onto results
      result.push(Buffer.concat([msgHeader, compressionDetails, compressedMessage]));

      // Continue recursing through the commands array
      serializeCommands(self, commands, result, callback);
    });
  } else {
    // Push the serialization of the command onto results
    result.push(originalCommandBuffer);

    // Continue recursing through the commands array
    serializeCommands(self, commands, result, callback);
  }
}
305727
public CommandInfo getCommandInfo(String commandName) {
        for (CommandInfo commandInfo : commandInfoList)
            if (commandInfo.cmd_name.toLowerCase().equals(commandName.toLowerCase()))
                return commandInfo;
        return null;
    }
570907
private Operation getOperation() {
        if (operation == null) {
            this.operation = (Operation) marshaller.unmarshal(new StringSource(getPayload(String.class)));
        }

        return operation;
    }
36312
public String requestCommandMessage(CommandType type) {
        VehicleMessage message = request(new Command(type));
        String value = null;
        if(message != null) {
            // Because we use the same key and value for commands and command
            // responses, if for some reason a Command is echoed back to the
            // device instead of a CommandResponse, you could get a casting
            // exception when trying to cast this message here. If we got a
            // Command, just ignore it and assume no response - I wasn't able to
            // reproduce it but we did have a few Bugsnag reports about it.
            try {
                CommandResponse response = message.asCommandResponse();
                if(response.getStatus()) {
                    value = response.getMessage();
                }
            } catch(ClassCastException e) {
                Log.w(TAG, "Expected a command response but got " + message +
                        " -- ignoring, assuming no response");
            }
        }
        return value;
    }
1003094
public String is(final String command) {
		LOG.info("Obtain result from  | " + command + " |");
		return is(command, new String[]{});
	}
885368
public List<Command> receive(final Command command) {

        Assert.requireNonNull(command, "command");
        LOG.trace("Received command of type {}", command.getClass().getSimpleName());
        List<Command> response = new LinkedList();// collecting parameter pattern

        if (!(command instanceof InterruptLongPollCommand)) {// signal commands must not update thread-confined state
            for (DolphinServerAction it : dolphinServerActions) {
                it.setDolphinResponse(response);// todo: can be deleted as soon as all action refer to the SMS
            }

            serverModelStore.setCurrentResponse(response);
        }


        List<CommandHandler> actions = registry.getActionsFor(command.getClass());
        if (actions.isEmpty()) {
            LOG.warn("There is no server action registered for received command type {}, known commands types are {}", command.getClass().getSimpleName(), registry.getActions().keySet());
            return response;
        }

        // copying the list of actions allows an Action to unregister itself
        // avoiding ConcurrentModificationException to be thrown by the loop
        List<CommandHandler> actionsCopy = new ArrayList<CommandHandler>();
        actionsCopy.addAll(actions);
        try {
            for (CommandHandler action : actionsCopy) {
                action.handleCommand(command, response);
            }

        } catch (Exception exception) {
            throw exception;
        }

        return response;
    }
1297459
public String getNavText() {

        String navText = "";
        try {
            navText = getCms().readPropertyObject(
                getCms().getSitePath(m_resource),
                CmsPropertyDefinition.PROPERTY_NAVTEXT,
                false).getValue();
        } catch (Throwable e) {
            String storedSiteRoot = getCms().getRequestContext().getSiteRoot();
            try {
                getCms().getRequestContext().setSiteRoot("");
                navText = getCms().readPropertyObject(
                    m_resource.getRootPath(),
                    CmsPropertyDefinition.PROPERTY_NAVTEXT,
                    false).getValue();
            } catch (Exception e1) {
                // should usually never happen
                if (LOG.isInfoEnabled()) {
                    LOG.info(e);
                }
            } finally {
                getCms().getRequestContext().setSiteRoot(storedSiteRoot);
            }
        }
        if (navText == null) {
            navText = "";
        }
        return navText;
    }
291891
StringBuilder getOutput() {
        if( output == null ) {
            CssFormatter block = copy( null );
            state.results.add( new CssPlainOutput( block.output ) );
            output = block.output;
        }
        return output;
    }
405335
public String getCommand() {
        lock.lock();
        try {
            String command = envState.commands.poll();
            if (command == null)
                return "";
            else
                return command;
        } finally {
            lock.unlock();
        }
    }
164754
private final Command takeExecutingCommand() {
		try {
			return this.commandAlreadySent.take();
		} catch (InterruptedException e) {
			Thread.currentThread().interrupt();
		}
		return null;
	}
183315
@Pure
	public static Map<String, List<Object>> getCommandLineOptions() {
		if (commandLineOptions != null) {
			return Collections.unmodifiableSortedMap(commandLineOptions);
		}
		return Collections.emptyMap();
	}
1326156
public java.util.List<String> getUndeploy() {
        if (undeploy == null) {
            undeploy = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return undeploy;
    }