Class DefaultPooledExchange

java.lang.Object
org.apache.camel.support.DefaultPooledExchange
All Implemented Interfaces:
org.apache.camel.Exchange, org.apache.camel.PooledExchange, org.apache.camel.VariableAware

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
    Modifier and Type
    Field
    Description
    protected final org.apache.camel.CamelContext
     
    protected Exception
     
    protected String
     
    protected org.apache.camel.Message
     
    protected final EnumMap<org.apache.camel.ExchangePropertyKey,Object>
     
    protected org.apache.camel.Message
     
    protected org.apache.camel.ExchangePattern
     
    protected Map<String,Object>
     
    protected boolean
     
    protected boolean
     
    protected boolean
     
    protected Map<String,org.apache.camel.SafeCopyProperty>
     
    protected org.apache.camel.support.ExchangeVariableRepository
     

    Fields inherited from interface org.apache.camel.Exchange

    ACCEPT_CONTENT_TYPE, ACTIVE_SPAN, 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, CLOSE_CLIENT_SCOPE, 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_EXCHANGE_FILE, 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, REST_OPENAPI, 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 Summary

    Constructors
    Constructor
    Description
    DefaultPooledExchange(org.apache.camel.CamelContext context)
     
    DefaultPooledExchange(org.apache.camel.CamelContext context, org.apache.camel.ExchangePattern pattern)
     
    DefaultPooledExchange(org.apache.camel.Exchange parent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    configureMessage(org.apache.camel.Message message)
    Configures the message after it has been set on the exchange
    org.apache.camel.Exchange
     
    protected String
     
    void
     
     
    org.apache.camel.clock.Clock
     
    org.apache.camel.CamelContext
     
    long
     
     
    <T> T
     
     
     
    org.apache.camel.Endpoint
     
     
    org.apache.camel.Message
     
    <T> T
    getIn(Class<T> type)
     
    org.apache.camel.Message
     
    <T> T
    getMessage(Class<T> type)
     
    org.apache.camel.Message
     
    <T> T
    getOut(Class<T> type)
     
    org.apache.camel.ExchangePattern
     
     
     
    <T> T
    getProperty(String name, Class<T> type)
     
    <T> T
    getProperty(String name, Object defaultValue, Class<T> type)
     
    getProperty(org.apache.camel.ExchangePropertyKey key)
     
    <T> T
    getProperty(org.apache.camel.ExchangePropertyKey key, Class<T> type)
     
    <T> T
    getProperty(org.apache.camel.ExchangePropertyKey key, Object defaultValue, Class<T> type)
     
    org.apache.camel.spi.UnitOfWork
     
     
    <T> T
    getVariable(String name, Class<T> type)
     
    <T> T
    getVariable(String name, Object defaultValue, Class<T> type)
     
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    newFromEndpoint(org.apache.camel.Endpoint fromEndpoint)
     
    newFromEndpoint(org.apache.camel.Endpoint fromEndpoint, org.apache.camel.ExchangePattern exchangePattern)
     
    void
    onDone(org.apache.camel.PooledExchange.OnDoneTask task)
     
    boolean
     
    boolean
    removeProperties(String pattern, String... excludePatterns)
     
     
    removeProperty(org.apache.camel.ExchangePropertyKey key)
     
     
    void
    reset(long created)
    Deprecated.
    void
    setAutoRelease(boolean autoRelease)
     
    void
     
    void
     
    void
    setIn(org.apache.camel.Message in)
     
    void
    setMessage(org.apache.camel.Message message)
     
    void
    setOut(org.apache.camel.Message out)
     
    void
    setPattern(org.apache.camel.ExchangePattern pattern)
     
    void
    setProperty(String name, Object value)
     
    void
    setProperty(org.apache.camel.ExchangePropertyKey key, Object value)
     
    void
    setRollbackOnly(boolean rollbackOnly)
     
    void
    setRollbackOnlyLast(boolean rollbackOnlyLast)
     
    void
    setRouteStop(boolean routeStop)
     
    void
    setVariable(String name, Object value)
     
    final String
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.camel.Exchange

    copy, getAllProperties, getContext, getCreated, getException, getException, getExchangeExtension, getExchangeId, getFromEndpoint, getFromRouteId, getIn, getMessage, getMessage, getOut, getPattern, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getUnitOfWork, getVariable, getVariable, getVariable, getVariables, hasOut, hasProperties, hasVariables, isExternalRedelivered, isFailed, isRollbackOnly, isRollbackOnlyLast, isRouteStop, isTransacted, removeProperties, removeProperties, removeProperty, removeProperty, removeVariable, setException, setExchangeId, setMessage, setPattern, setProperty, setProperty, setRollbackOnly, setRollbackOnlyLast, setRouteStop, setVariable
  • Field Details

    • internalProperties

      protected final EnumMap<org.apache.camel.ExchangePropertyKey,Object> internalProperties
    • context

      protected final org.apache.camel.CamelContext context
    • properties

      protected Map<String,Object> properties
    • in

      protected org.apache.camel.Message in
    • out

      protected org.apache.camel.Message out
    • exception

      protected Exception exception
    • exchangeId

      protected String exchangeId
    • pattern

      protected org.apache.camel.ExchangePattern pattern
    • routeStop

      protected boolean routeStop
    • rollbackOnly

      protected boolean rollbackOnly
    • rollbackOnlyLast

      protected boolean rollbackOnlyLast
    • safeCopyProperties

      protected Map<String,org.apache.camel.SafeCopyProperty> safeCopyProperties
    • variableRepository

      protected org.apache.camel.support.ExchangeVariableRepository variableRepository
  • Constructor Details

    • DefaultPooledExchange

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

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

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

    • 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

      @Deprecated(since="4.4.0") public void reset(long created)
      Deprecated.
      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
    • getClock

      public org.apache.camel.clock.Clock getClock()
      Specified by:
      getClock in interface org.apache.camel.Exchange
    • newFromEndpoint

      public static DefaultPooledExchange newFromEndpoint(org.apache.camel.Endpoint fromEndpoint)
    • newFromEndpoint

      public static DefaultPooledExchange newFromEndpoint(org.apache.camel.Endpoint fromEndpoint, org.apache.camel.ExchangePattern exchangePattern)
    • 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 <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
    • 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
    • getVariable

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

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

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

      public void setVariable(String name, Object value)
      Specified by:
      setVariable in interface org.apache.camel.Exchange
      Specified by:
      setVariable in interface org.apache.camel.VariableAware
    • removeVariable

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

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

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

      public <T> T getIn(Class<T> type)
      Specified by:
      getIn in interface org.apache.camel.Exchange
    • 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
    • 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
    • getFromRouteId

      public String getFromRouteId()
      Specified by:
      getFromRouteId in interface org.apache.camel.Exchange
    • 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
    • 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
    • configureMessage

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

      protected String createExchangeId()
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • getExchangeExtension

      public ExtendedExchangeExtension getExchangeExtension()
      Specified by:
      getExchangeExtension in interface org.apache.camel.Exchange