Class DefaultExecBinding

    • Constructor Detail

      • DefaultExecBinding

        public DefaultExecBinding()
    • Method Detail

      • writeOutput

        public void writeOutput​(org.apache.camel.Exchange exchange,
                                ExecResult result)
        Description copied from interface: ExecBinding
        Populates the exchange form the ExecResult.
        Specified by:
        writeOutput in interface ExecBinding
        Parameters:
        exchange - a Camel Exchange, in which to write the result
        result - the result of a command execution
        See Also:
        ExecCommandExecutor
      • writeOutputInMessage

        protected void writeOutputInMessage​(org.apache.camel.Message message,
                                            ExecResult result)
        Write the ExecResult in the message body. Write the stderr and the exit value for convenience in the message headers.
        The stdout and/or resultFile should be accessible using a converter or using the result object directly.
        Parameters:
        message - a Camel message
        result - an ExecResult instance
      • getAndRemoveHeader

        protected <T> T getAndRemoveHeader​(org.apache.camel.Message message,
                                           String headerName,
                                           T defaultValue,
                                           Class<T> headerType)
        Gets and removes the headerName header form the input message (the header will not be propagated)