Class DefaultPooledExchange

  • All Implemented Interfaces:
    org.apache.camel.Exchange, org.apache.camel.ExtendedExchange, org.apache.camel.PooledExchange

    public final class DefaultPooledExchange
    extends Object
    implements org.apache.camel.PooledExchange
    The default and only implementation of PooledExchange.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.camel.PooledExchange

        org.apache.camel.PooledExchange.OnDoneTask
    • Field Summary

      • Fields inherited from interface org.apache.camel.Exchange

        ACCEPT_CONTENT_TYPE, AGGREGATED_COLLECTION_GUARD, AGGREGATED_COMPLETED_BY, AGGREGATED_CORRELATION_KEY, AGGREGATED_SIZE, AGGREGATED_TIMEOUT, AGGREGATION_COMPLETE_ALL_GROUPS, AGGREGATION_COMPLETE_ALL_GROUPS_INCLUSIVE, AGGREGATION_COMPLETE_CURRENT_GROUP, AGGREGATION_STRATEGY, ASYNC_WAIT, AUTHENTICATION, AUTHENTICATION_FAILURE_POLICY_ID, BATCH_COMPLETE, BATCH_INDEX, BATCH_SIZE, BEAN_METHOD_NAME, BINDING, BREADCRUMB_ID, CHARSET_NAME, CIRCUIT_BREAKER_STATE, CLAIM_CHECK_REPOSITORY, COMPILE_SCRIPT, CONTENT_ENCODING, CONTENT_LENGTH, CONTENT_SCHEMA, CONTENT_SCHEMA_TYPE, CONTENT_TYPE, COOKIE_HANDLER, CORRELATION_ID, CREATED_TIMESTAMP, DATASET_INDEX, DEFAULT_CHARSET_PROPERTY, DESTINATION_OVERRIDE_URL, DISABLE_HTTP_STREAM_CACHE, DOCUMENT_BUILDER_FACTORY, DUPLICATE_MESSAGE, ERRORHANDLER_BRIDGE, ERRORHANDLER_CIRCUIT_DETECTED, ERRORHANDLER_HANDLED, EVALUATE_EXPRESSION_RESULT, EXCEPTION_CAUGHT, EXCEPTION_HANDLED, EXTERNAL_REDELIVERED, FAILURE_ENDPOINT, FAILURE_HANDLED, FAILURE_ROUTE_ID, FATAL_FALLBACK_ERROR_HANDLER, FILE_CONTENT_TYPE, FILE_LAST_MODIFIED, FILE_LENGTH, FILE_LOCAL_WORK_PATH, FILE_LOCK_CHANNEL_FILE, FILE_LOCK_EXCLUSIVE_LOCK, FILE_LOCK_FILE_ACQUIRED, FILE_LOCK_FILE_NAME, FILE_LOCK_RANDOM_ACCESS_FILE, FILE_NAME, FILE_NAME_CONSUMED, FILE_NAME_ONLY, FILE_NAME_PRODUCED, FILE_PARENT, FILE_PATH, FILTER_MATCHED, FILTER_NON_XML_CHARS, GROUPED_EXCHANGE, HTTP_BASE_URI, HTTP_CHARACTER_ENCODING, HTTP_CHUNKED, HTTP_HOST, HTTP_METHOD, HTTP_PATH, HTTP_PORT, HTTP_PROTOCOL_VERSION, HTTP_QUERY, HTTP_RAW_QUERY, HTTP_RESPONSE_CODE, HTTP_RESPONSE_TEXT, HTTP_SCHEME, HTTP_SERVLET_REQUEST, HTTP_SERVLET_RESPONSE, HTTP_URI, HTTP_URL, INTERCEPT_SEND_TO_ENDPOINT_WHEN_MATCHED, INTERCEPTED_ENDPOINT, INTERRUPTED, LANGUAGE_SCRIPT, LOG_DEBUG_BODY_MAX_CHARS, LOG_DEBUG_BODY_STREAMS, LOG_EIP_NAME, LOOP_INDEX, LOOP_SIZE, MAXIMUM_CACHE_POOL_SIZE, MAXIMUM_ENDPOINT_CACHE_SIZE, MAXIMUM_SIMPLE_CACHE_SIZE, MAXIMUM_TRANSFORMER_CACHE_SIZE, MAXIMUM_VALIDATOR_CACHE_SIZE, MESSAGE_HISTORY, MESSAGE_HISTORY_HEADER_FORMAT, MESSAGE_HISTORY_OUTPUT_FORMAT, MESSAGE_TIMESTAMP, MULTICAST_COMPLETE, MULTICAST_INDEX, NOTIFY_EVENT, OFFSET, ON_COMPLETION, ON_COMPLETION_ROUTE_IDS, OVERRULE_FILE_NAME, PARENT_UNIT_OF_WORK, RECEIVED_TIMESTAMP, RECIPIENT_LIST_ENDPOINT, REDELIVERED, REDELIVERY_COUNTER, REDELIVERY_DELAY, REDELIVERY_EXHAUSTED, REDELIVERY_MAX_COUNTER, REST_HTTP_QUERY, REST_HTTP_URI, REUSE_SCRIPT_ENGINE, ROLLBACK_ONLY, ROLLBACK_ONLY_LAST, ROUTE_STOP, SAGA_LONG_RUNNING_ACTION, SAXPARSER_FACTORY, SCHEDULER_POLLED_MESSAGES, SKIP_GZIP_ENCODING, SKIP_WWW_FORM_URLENCODED, SLIP_ENDPOINT, SLIP_PRODUCER, SOAP_ACTION, SPLIT_COMPLETE, SPLIT_INDEX, SPLIT_SIZE, STEP_ID, STREAM_CACHE_UNIT_OF_WORK, TIMER_COUNTER, TIMER_FIRED_TIME, TIMER_NAME, TIMER_PERIOD, TIMER_TIME, TO_ENDPOINT, TRACE_EVENT, TRACE_EVENT_EXCHANGE, TRACE_EVENT_NODE_ID, TRACE_EVENT_TIMESTAMP, TRACING_HEADER_FORMAT, TRACING_OUTPUT_FORMAT, TRANSACTION_CONTEXT_DATA, TRANSFER_ENCODING, TRY_ROUTE_BLOCK, UNIT_OF_WORK_EXHAUSTED, XSLT_ERROR, XSLT_FATAL_ERROR, XSLT_FILE_NAME, XSLT_WARNING
    • Constructor Detail

      • DefaultPooledExchange

        public DefaultPooledExchange​(org.apache.camel.CamelContext context)
      • DefaultPooledExchange

        public DefaultPooledExchange​(org.apache.camel.CamelContext context,
                                     org.apache.camel.ExchangePattern pattern)
      • DefaultPooledExchange

        public DefaultPooledExchange​(org.apache.camel.Exchange parent)
      • DefaultPooledExchange

        public DefaultPooledExchange​(org.apache.camel.Endpoint fromEndpoint)
      • DefaultPooledExchange

        public DefaultPooledExchange​(org.apache.camel.Endpoint fromEndpoint,
                                     org.apache.camel.ExchangePattern pattern)
    • Method Detail

      • isAutoRelease

        public boolean isAutoRelease()
        Specified by:
        isAutoRelease in interface org.apache.camel.PooledExchange
      • setAutoRelease

        public void setAutoRelease​(boolean autoRelease)
        Specified by:
        setAutoRelease in interface org.apache.camel.PooledExchange
      • onDone

        public void onDone​(org.apache.camel.PooledExchange.OnDoneTask task)
        Specified by:
        onDone in interface org.apache.camel.PooledExchange
      • done

        public void done()
        Specified by:
        done in interface org.apache.camel.PooledExchange
      • reset

        public void reset​(long created)
        Specified by:
        reset in interface org.apache.camel.PooledExchange
      • getIn

        public org.apache.camel.Message getIn()
        Specified by:
        getIn in interface org.apache.camel.Exchange
      • setIn

        public void setIn​(org.apache.camel.Message in)
        Specified by:
        setIn in interface org.apache.camel.Exchange
      • getOut

        public org.apache.camel.Message getOut()
        Specified by:
        getOut in interface org.apache.camel.Exchange
      • setOut

        public void setOut​(org.apache.camel.Message out)
        Specified by:
        setOut in interface org.apache.camel.Exchange
      • getCreated

        public long getCreated()
        Specified by:
        getCreated in interface org.apache.camel.Exchange
      • copy

        public org.apache.camel.Exchange copy()
        Specified by:
        copy in interface org.apache.camel.Exchange
      • getContext

        public org.apache.camel.CamelContext getContext()
        Specified by:
        getContext in interface org.apache.camel.Exchange
      • getProperty

        public Object getProperty​(org.apache.camel.ExchangePropertyKey key)
        Specified by:
        getProperty in interface org.apache.camel.Exchange
      • getProperty

        public <T> T getProperty​(org.apache.camel.ExchangePropertyKey key,
                                 Class<T> type)
        Specified by:
        getProperty in interface org.apache.camel.Exchange
      • getProperty

        public <T> T getProperty​(org.apache.camel.ExchangePropertyKey key,
                                 Object defaultValue,
                                 Class<T> type)
        Specified by:
        getProperty in interface org.apache.camel.Exchange
      • setProperty

        public void setProperty​(org.apache.camel.ExchangePropertyKey key,
                                Object value)
        Specified by:
        setProperty in interface org.apache.camel.Exchange
      • removeProperty

        public Object removeProperty​(org.apache.camel.ExchangePropertyKey key)
        Specified by:
        removeProperty in interface org.apache.camel.Exchange
      • getProperty

        public Object getProperty​(String name)
        Specified by:
        getProperty in interface org.apache.camel.Exchange
      • getProperty

        public Object getProperty​(String name,
                                  Object defaultValue)
        Specified by:
        getProperty in interface org.apache.camel.Exchange
      • getProperty

        public <T> T getProperty​(String name,
                                 Class<T> type)
        Specified by:
        getProperty in interface org.apache.camel.Exchange
      • getProperty

        public <T> T getProperty​(String name,
                                 Object defaultValue,
                                 Class<T> type)
        Specified by:
        getProperty in interface org.apache.camel.Exchange
      • setProperty

        public void setProperty​(String name,
                                Object value)
        Specified by:
        setProperty in interface org.apache.camel.Exchange
      • setProperties

        public void setProperties​(Map<String,​Object> properties)
        Specified by:
        setProperties in interface org.apache.camel.ExtendedExchange
      • removeProperty

        public Object removeProperty​(String name)
        Specified by:
        removeProperty in interface org.apache.camel.Exchange
      • removeProperties

        public boolean removeProperties​(String pattern)
        Specified by:
        removeProperties in interface org.apache.camel.Exchange
      • removeProperties

        public boolean removeProperties​(String pattern,
                                        String... excludePatterns)
        Specified by:
        removeProperties in interface org.apache.camel.Exchange
      • getProperties

        public Map<String,​Object> getProperties()
        Specified by:
        getProperties in interface org.apache.camel.Exchange
      • getAllProperties

        public Map<String,​Object> getAllProperties()
        Specified by:
        getAllProperties in interface org.apache.camel.Exchange
      • hasProperties

        public boolean hasProperties()
        Specified by:
        hasProperties in interface org.apache.camel.Exchange
      • getIn

        public <T> T getIn​(Class<T> type)
        Specified by:
        getIn in interface org.apache.camel.Exchange
      • getInOrNull

        public <T> T getInOrNull​(Class<T> type)
        Specified by:
        getInOrNull in interface org.apache.camel.ExtendedExchange
      • getOut

        public <T> T getOut​(Class<T> type)
        Specified by:
        getOut in interface org.apache.camel.Exchange
      • hasOut

        public boolean hasOut()
        Specified by:
        hasOut in interface org.apache.camel.Exchange
      • getMessage

        public org.apache.camel.Message getMessage()
        Specified by:
        getMessage in interface org.apache.camel.Exchange
      • getMessage

        public <T> T getMessage​(Class<T> type)
        Specified by:
        getMessage in interface org.apache.camel.Exchange
      • setMessage

        public void setMessage​(org.apache.camel.Message message)
        Specified by:
        setMessage in interface org.apache.camel.Exchange
      • getException

        public Exception getException()
        Specified by:
        getException in interface org.apache.camel.Exchange
      • getException

        public <T> T getException​(Class<T> type)
        Specified by:
        getException in interface org.apache.camel.Exchange
      • setException

        public void setException​(Throwable t)
        Specified by:
        setException in interface org.apache.camel.Exchange
      • adapt

        public <T extends org.apache.camel.Exchange> T adapt​(Class<T> type)
        Specified by:
        adapt in interface org.apache.camel.Exchange
      • getPattern

        public org.apache.camel.ExchangePattern getPattern()
        Specified by:
        getPattern in interface org.apache.camel.Exchange
      • setPattern

        public void setPattern​(org.apache.camel.ExchangePattern pattern)
        Specified by:
        setPattern in interface org.apache.camel.Exchange
      • getFromEndpoint

        public org.apache.camel.Endpoint getFromEndpoint()
        Specified by:
        getFromEndpoint in interface org.apache.camel.Exchange
      • setFromEndpoint

        public void setFromEndpoint​(org.apache.camel.Endpoint fromEndpoint)
        Specified by:
        setFromEndpoint in interface org.apache.camel.ExtendedExchange
      • getFromRouteId

        public String getFromRouteId()
        Specified by:
        getFromRouteId in interface org.apache.camel.Exchange
      • setFromRouteId

        public void setFromRouteId​(String fromRouteId)
        Specified by:
        setFromRouteId in interface org.apache.camel.ExtendedExchange
      • getExchangeId

        public String getExchangeId()
        Specified by:
        getExchangeId in interface org.apache.camel.Exchange
      • setExchangeId

        public void setExchangeId​(String id)
        Specified by:
        setExchangeId in interface org.apache.camel.Exchange
      • isFailed

        public boolean isFailed()
        Specified by:
        isFailed in interface org.apache.camel.Exchange
      • isTransacted

        public boolean isTransacted()
        Specified by:
        isTransacted in interface org.apache.camel.Exchange
      • setTransacted

        public void setTransacted​(boolean transacted)
        Specified by:
        setTransacted in interface org.apache.camel.ExtendedExchange
      • isRouteStop

        public boolean isRouteStop()
        Specified by:
        isRouteStop in interface org.apache.camel.Exchange
      • setRouteStop

        public void setRouteStop​(boolean routeStop)
        Specified by:
        setRouteStop in interface org.apache.camel.Exchange
      • isExternalRedelivered

        public boolean isExternalRedelivered()
        Specified by:
        isExternalRedelivered in interface org.apache.camel.Exchange
      • isRollbackOnly

        public boolean isRollbackOnly()
        Specified by:
        isRollbackOnly in interface org.apache.camel.Exchange
      • setRollbackOnly

        public void setRollbackOnly​(boolean rollbackOnly)
        Specified by:
        setRollbackOnly in interface org.apache.camel.Exchange
      • isRollbackOnlyLast

        public boolean isRollbackOnlyLast()
        Specified by:
        isRollbackOnlyLast in interface org.apache.camel.Exchange
      • setRollbackOnlyLast

        public void setRollbackOnlyLast​(boolean rollbackOnlyLast)
        Specified by:
        setRollbackOnlyLast in interface org.apache.camel.Exchange
      • getUnitOfWork

        public org.apache.camel.spi.UnitOfWork getUnitOfWork()
        Specified by:
        getUnitOfWork in interface org.apache.camel.Exchange
      • setUnitOfWork

        public void setUnitOfWork​(org.apache.camel.spi.UnitOfWork unitOfWork)
        Specified by:
        setUnitOfWork in interface org.apache.camel.ExtendedExchange
      • addOnCompletion

        public void addOnCompletion​(org.apache.camel.spi.Synchronization onCompletion)
        Specified by:
        addOnCompletion in interface org.apache.camel.ExtendedExchange
      • containsOnCompletion

        public boolean containsOnCompletion​(org.apache.camel.spi.Synchronization onCompletion)
        Specified by:
        containsOnCompletion in interface org.apache.camel.ExtendedExchange
      • handoverCompletions

        public void handoverCompletions​(org.apache.camel.Exchange target)
        Specified by:
        handoverCompletions in interface org.apache.camel.ExtendedExchange
      • handoverCompletions

        public List<org.apache.camel.spi.Synchronization> handoverCompletions()
        Specified by:
        handoverCompletions in interface org.apache.camel.ExtendedExchange
      • getHistoryNodeId

        public String getHistoryNodeId()
        Specified by:
        getHistoryNodeId in interface org.apache.camel.ExtendedExchange
      • setHistoryNodeId

        public void setHistoryNodeId​(String historyNodeId)
        Specified by:
        setHistoryNodeId in interface org.apache.camel.ExtendedExchange
      • getHistoryNodeLabel

        public String getHistoryNodeLabel()
        Specified by:
        getHistoryNodeLabel in interface org.apache.camel.ExtendedExchange
      • setHistoryNodeLabel

        public void setHistoryNodeLabel​(String historyNodeLabel)
        Specified by:
        setHistoryNodeLabel in interface org.apache.camel.ExtendedExchange
      • getHistoryNodeSource

        public String getHistoryNodeSource()
        Specified by:
        getHistoryNodeSource in interface org.apache.camel.ExtendedExchange
      • setHistoryNodeSource

        public void setHistoryNodeSource​(String historyNodeSource)
        Specified by:
        setHistoryNodeSource in interface org.apache.camel.ExtendedExchange
      • isNotifyEvent

        public boolean isNotifyEvent()
        Specified by:
        isNotifyEvent in interface org.apache.camel.ExtendedExchange
      • setNotifyEvent

        public void setNotifyEvent​(boolean notifyEvent)
        Specified by:
        setNotifyEvent in interface org.apache.camel.ExtendedExchange
      • isInterrupted

        public boolean isInterrupted()
        Specified by:
        isInterrupted in interface org.apache.camel.ExtendedExchange
      • setInterrupted

        public void setInterrupted​(boolean interrupted)
        Specified by:
        setInterrupted in interface org.apache.camel.ExtendedExchange
      • setInterruptable

        public void setInterruptable​(boolean interruptable)
        Specified by:
        setInterruptable in interface org.apache.camel.ExtendedExchange
      • isRedeliveryExhausted

        public boolean isRedeliveryExhausted()
        Specified by:
        isRedeliveryExhausted in interface org.apache.camel.ExtendedExchange
      • setRedeliveryExhausted

        public void setRedeliveryExhausted​(boolean redeliveryExhausted)
        Specified by:
        setRedeliveryExhausted in interface org.apache.camel.ExtendedExchange
      • getErrorHandlerHandled

        public Boolean getErrorHandlerHandled()
        Specified by:
        getErrorHandlerHandled in interface org.apache.camel.ExtendedExchange
      • isErrorHandlerHandledSet

        public boolean isErrorHandlerHandledSet()
        Specified by:
        isErrorHandlerHandledSet in interface org.apache.camel.ExtendedExchange
      • isErrorHandlerHandled

        public boolean isErrorHandlerHandled()
        Specified by:
        isErrorHandlerHandled in interface org.apache.camel.ExtendedExchange
      • setErrorHandlerHandled

        public void setErrorHandlerHandled​(Boolean errorHandlerHandled)
        Specified by:
        setErrorHandlerHandled in interface org.apache.camel.ExtendedExchange
      • isStreamCacheDisabled

        public boolean isStreamCacheDisabled()
        Specified by:
        isStreamCacheDisabled in interface org.apache.camel.ExtendedExchange
      • setStreamCacheDisabled

        public void setStreamCacheDisabled​(boolean streamCacheDisabled)
        Specified by:
        setStreamCacheDisabled in interface org.apache.camel.ExtendedExchange
      • configureMessage

        protected void configureMessage​(org.apache.camel.Message message)
        Configures the message after it has been set on the exchange
      • copyInternalProperties

        public void copyInternalProperties​(org.apache.camel.Exchange target)
        Specified by:
        copyInternalProperties in interface org.apache.camel.ExtendedExchange
      • getInternalProperties

        public Map<String,​Object> getInternalProperties()
        Specified by:
        getInternalProperties in interface org.apache.camel.ExtendedExchange
      • getDefaultConsumerCallback

        public org.apache.camel.AsyncCallback getDefaultConsumerCallback()
        Specified by:
        getDefaultConsumerCallback in interface org.apache.camel.ExtendedExchange
      • setDefaultConsumerCallback

        public void setDefaultConsumerCallback​(org.apache.camel.AsyncCallback defaultConsumerCallback)
        Specified by:
        setDefaultConsumerCallback in interface org.apache.camel.ExtendedExchange
      • createExchangeId

        protected String createExchangeId()
      • setSafeCopyProperty

        public void setSafeCopyProperty​(String key,
                                        org.apache.camel.SafeCopyProperty value)
        Specified by:
        setSafeCopyProperty in interface org.apache.camel.ExtendedExchange
      • getSafeCopyProperty

        public <T> T getSafeCopyProperty​(String key,
                                         Class<T> type)
        Specified by:
        getSafeCopyProperty in interface org.apache.camel.ExtendedExchange