Package org.apache.camel.support
Class DefaultExchange
- java.lang.Object
-
- org.apache.camel.support.DefaultExchange
-
- All Implemented Interfaces:
org.apache.camel.Exchange,org.apache.camel.ExtendedExchange
public final class DefaultExchange extends Object
The default and only implementation ofExchange.
-
-
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_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, 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, TRANSFER_ENCODING, TRY_ROUTE_BLOCK, UNIT_OF_WORK_EXHAUSTED, UNIT_OF_WORK_PROCESS_SYNC, XSLT_ERROR, XSLT_FATAL_ERROR, XSLT_FILE_NAME, XSLT_WARNING
-
-
Constructor Summary
Constructors Constructor Description DefaultExchange(org.apache.camel.CamelContext context)DefaultExchange(org.apache.camel.CamelContext context, org.apache.camel.ExchangePattern pattern)DefaultExchange(org.apache.camel.Endpoint fromEndpoint)DefaultExchange(org.apache.camel.Endpoint fromEndpoint, org.apache.camel.ExchangePattern pattern)DefaultExchange(org.apache.camel.Exchange parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends org.apache.camel.Exchange>
Tadapt(Class<T> type)voidaddOnCompletion(org.apache.camel.spi.Synchronization onCompletion)protected voidconfigureMessage(org.apache.camel.Message message)Configures the message after it has been set on the exchangebooleancontainsOnCompletion(org.apache.camel.spi.Synchronization onCompletion)org.apache.camel.Exchangecopy()voidcopyInternalProperties(org.apache.camel.Exchange target)protected StringcreateExchangeId()Map<String,Object>getAllProperties()org.apache.camel.CamelContextgetContext()longgetCreated()org.apache.camel.AsyncCallbackgetDefaultConsumerCallback()BooleangetErrorHandlerHandled()ExceptiongetException()<T> TgetException(Class<T> type)StringgetExchangeId()org.apache.camel.EndpointgetFromEndpoint()StringgetFromRouteId()StringgetHistoryNodeId()StringgetHistoryNodeLabel()org.apache.camel.MessagegetIn()<T> TgetIn(Class<T> type)<T> TgetInOrNull(Class<T> type)Map<String,Object>getInternalProperties()org.apache.camel.MessagegetMessage()<T> TgetMessage(Class<T> type)org.apache.camel.MessagegetOut()<T> TgetOut(Class<T> type)org.apache.camel.ExchangePatterngetPattern()Map<String,Object>getProperties()ObjectgetProperty(String name)<T> TgetProperty(String name, Class<T> type)ObjectgetProperty(String name, Object defaultValue)<T> TgetProperty(String name, Object defaultValue, Class<T> type)ObjectgetProperty(org.apache.camel.ExchangePropertyKey key)<T> TgetProperty(org.apache.camel.ExchangePropertyKey key, Class<T> type)<T> TgetProperty(org.apache.camel.ExchangePropertyKey key, Object defaultValue, Class<T> type)<T> TgetSafeCopyProperty(String key, Class<T> type)org.apache.camel.spi.UnitOfWorkgetUnitOfWork()List<org.apache.camel.spi.Synchronization>handoverCompletions()voidhandoverCompletions(org.apache.camel.Exchange target)booleanhasOut()booleanhasProperties()booleanisErrorHandlerHandled()booleanisErrorHandlerHandledSet()booleanisExternalRedelivered()booleanisFailed()booleanisInterrupted()booleanisNotifyEvent()booleanisRedeliveryExhausted()booleanisRollbackOnly()booleanisRollbackOnlyLast()booleanisRouteStop()booleanisTransacted()booleanremoveProperties(String pattern)booleanremoveProperties(String pattern, String... excludePatterns)ObjectremoveProperty(String name)ObjectremoveProperty(org.apache.camel.ExchangePropertyKey key)voidsetDefaultConsumerCallback(org.apache.camel.AsyncCallback defaultConsumerCallback)voidsetErrorHandlerHandled(Boolean errorHandlerHandled)voidsetException(Throwable t)voidsetExchangeId(String id)voidsetFromEndpoint(org.apache.camel.Endpoint fromEndpoint)voidsetFromRouteId(String fromRouteId)voidsetHistoryNodeId(String historyNodeId)voidsetHistoryNodeLabel(String historyNodeLabel)voidsetIn(org.apache.camel.Message in)voidsetInterruptable(boolean interruptable)voidsetInterrupted(boolean interrupted)voidsetMessage(org.apache.camel.Message message)voidsetNotifyEvent(boolean notifyEvent)voidsetOut(org.apache.camel.Message out)voidsetPattern(org.apache.camel.ExchangePattern pattern)voidsetProperties(Map<String,Object> properties)voidsetProperty(String name, Object value)voidsetProperty(org.apache.camel.ExchangePropertyKey key, Object value)voidsetRedeliveryExhausted(boolean redeliveryExhausted)voidsetRollbackOnly(boolean rollbackOnly)voidsetRollbackOnlyLast(boolean rollbackOnlyLast)voidsetRouteStop(boolean routeStop)voidsetSafeCopyProperty(String key, org.apache.camel.SafeCopyProperty value)voidsetTransacted(boolean transacted)voidsetUnitOfWork(org.apache.camel.spi.UnitOfWork unitOfWork)StringtoString()
-
-
-
Constructor Detail
-
DefaultExchange
public DefaultExchange(org.apache.camel.CamelContext context)
-
DefaultExchange
public DefaultExchange(org.apache.camel.CamelContext context, org.apache.camel.ExchangePattern pattern)
-
DefaultExchange
public DefaultExchange(org.apache.camel.Exchange parent)
-
DefaultExchange
public DefaultExchange(org.apache.camel.Endpoint fromEndpoint)
-
DefaultExchange
public DefaultExchange(org.apache.camel.Endpoint fromEndpoint, org.apache.camel.ExchangePattern pattern)
-
-
Method Detail
-
getCreated
public long getCreated()
- Specified by:
getCreatedin interfaceorg.apache.camel.Exchange
-
copy
public org.apache.camel.Exchange copy()
- Specified by:
copyin interfaceorg.apache.camel.Exchange
-
getContext
public org.apache.camel.CamelContext getContext()
- Specified by:
getContextin interfaceorg.apache.camel.Exchange
-
getProperty
public Object getProperty(org.apache.camel.ExchangePropertyKey key)
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
public <T> T getProperty(org.apache.camel.ExchangePropertyKey key, Class<T> type)- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
public <T> T getProperty(org.apache.camel.ExchangePropertyKey key, Object defaultValue, Class<T> type)- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
setProperty
public void setProperty(org.apache.camel.ExchangePropertyKey key, Object value)- Specified by:
setPropertyin interfaceorg.apache.camel.Exchange
-
removeProperty
public Object removeProperty(org.apache.camel.ExchangePropertyKey key)
- Specified by:
removePropertyin interfaceorg.apache.camel.Exchange
-
getProperty
public Object getProperty(String name)
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
public Object getProperty(String name, Object defaultValue)
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
public <T> T getProperty(String name, Class<T> type)
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
public <T> T getProperty(String name, Object defaultValue, Class<T> type)
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
setProperty
public void setProperty(String name, Object value)
- Specified by:
setPropertyin interfaceorg.apache.camel.Exchange
-
setProperties
public void setProperties(Map<String,Object> properties)
- Specified by:
setPropertiesin interfaceorg.apache.camel.ExtendedExchange
-
removeProperty
public Object removeProperty(String name)
- Specified by:
removePropertyin interfaceorg.apache.camel.Exchange
-
removeProperties
public boolean removeProperties(String pattern)
- Specified by:
removePropertiesin interfaceorg.apache.camel.Exchange
-
removeProperties
public boolean removeProperties(String pattern, String... excludePatterns)
- Specified by:
removePropertiesin interfaceorg.apache.camel.Exchange
-
getProperties
public Map<String,Object> getProperties()
- Specified by:
getPropertiesin interfaceorg.apache.camel.Exchange
-
getAllProperties
public Map<String,Object> getAllProperties()
- Specified by:
getAllPropertiesin interfaceorg.apache.camel.Exchange
-
hasProperties
public boolean hasProperties()
- Specified by:
hasPropertiesin interfaceorg.apache.camel.Exchange
-
getIn
public org.apache.camel.Message getIn()
- Specified by:
getInin interfaceorg.apache.camel.Exchange
-
getIn
public <T> T getIn(Class<T> type)
- Specified by:
getInin interfaceorg.apache.camel.Exchange
-
getInOrNull
public <T> T getInOrNull(Class<T> type)
- Specified by:
getInOrNullin interfaceorg.apache.camel.ExtendedExchange
-
setIn
public void setIn(org.apache.camel.Message in)
- Specified by:
setInin interfaceorg.apache.camel.Exchange
-
getOut
public org.apache.camel.Message getOut()
- Specified by:
getOutin interfaceorg.apache.camel.Exchange
-
getOut
public <T> T getOut(Class<T> type)
- Specified by:
getOutin interfaceorg.apache.camel.Exchange
-
hasOut
public boolean hasOut()
- Specified by:
hasOutin interfaceorg.apache.camel.Exchange
-
setOut
public void setOut(org.apache.camel.Message out)
- Specified by:
setOutin interfaceorg.apache.camel.Exchange
-
getMessage
public org.apache.camel.Message getMessage()
- Specified by:
getMessagein interfaceorg.apache.camel.Exchange
-
getMessage
public <T> T getMessage(Class<T> type)
- Specified by:
getMessagein interfaceorg.apache.camel.Exchange
-
setMessage
public void setMessage(org.apache.camel.Message message)
- Specified by:
setMessagein interfaceorg.apache.camel.Exchange
-
getException
public Exception getException()
- Specified by:
getExceptionin interfaceorg.apache.camel.Exchange
-
getException
public <T> T getException(Class<T> type)
- Specified by:
getExceptionin interfaceorg.apache.camel.Exchange
-
setException
public void setException(Throwable t)
- Specified by:
setExceptionin interfaceorg.apache.camel.Exchange
-
adapt
public <T extends org.apache.camel.Exchange> T adapt(Class<T> type)
- Specified by:
adaptin interfaceorg.apache.camel.Exchange
-
getPattern
public org.apache.camel.ExchangePattern getPattern()
- Specified by:
getPatternin interfaceorg.apache.camel.Exchange
-
setPattern
public void setPattern(org.apache.camel.ExchangePattern pattern)
- Specified by:
setPatternin interfaceorg.apache.camel.Exchange
-
getFromEndpoint
public org.apache.camel.Endpoint getFromEndpoint()
- Specified by:
getFromEndpointin interfaceorg.apache.camel.Exchange
-
setFromEndpoint
public void setFromEndpoint(org.apache.camel.Endpoint fromEndpoint)
- Specified by:
setFromEndpointin interfaceorg.apache.camel.ExtendedExchange
-
getFromRouteId
public String getFromRouteId()
- Specified by:
getFromRouteIdin interfaceorg.apache.camel.Exchange
-
setFromRouteId
public void setFromRouteId(String fromRouteId)
- Specified by:
setFromRouteIdin interfaceorg.apache.camel.ExtendedExchange
-
getExchangeId
public String getExchangeId()
- Specified by:
getExchangeIdin interfaceorg.apache.camel.Exchange
-
setExchangeId
public void setExchangeId(String id)
- Specified by:
setExchangeIdin interfaceorg.apache.camel.Exchange
-
isFailed
public boolean isFailed()
- Specified by:
isFailedin interfaceorg.apache.camel.Exchange
-
isTransacted
public boolean isTransacted()
- Specified by:
isTransactedin interfaceorg.apache.camel.Exchange
-
setTransacted
public void setTransacted(boolean transacted)
- Specified by:
setTransactedin interfaceorg.apache.camel.ExtendedExchange
-
isRouteStop
public boolean isRouteStop()
- Specified by:
isRouteStopin interfaceorg.apache.camel.Exchange
-
setRouteStop
public void setRouteStop(boolean routeStop)
- Specified by:
setRouteStopin interfaceorg.apache.camel.Exchange
-
isExternalRedelivered
public boolean isExternalRedelivered()
- Specified by:
isExternalRedeliveredin interfaceorg.apache.camel.Exchange
-
isRollbackOnly
public boolean isRollbackOnly()
- Specified by:
isRollbackOnlyin interfaceorg.apache.camel.Exchange
-
setRollbackOnly
public void setRollbackOnly(boolean rollbackOnly)
- Specified by:
setRollbackOnlyin interfaceorg.apache.camel.Exchange
-
isRollbackOnlyLast
public boolean isRollbackOnlyLast()
- Specified by:
isRollbackOnlyLastin interfaceorg.apache.camel.Exchange
-
setRollbackOnlyLast
public void setRollbackOnlyLast(boolean rollbackOnlyLast)
- Specified by:
setRollbackOnlyLastin interfaceorg.apache.camel.Exchange
-
getUnitOfWork
public org.apache.camel.spi.UnitOfWork getUnitOfWork()
- Specified by:
getUnitOfWorkin interfaceorg.apache.camel.Exchange
-
setUnitOfWork
public void setUnitOfWork(org.apache.camel.spi.UnitOfWork unitOfWork)
- Specified by:
setUnitOfWorkin interfaceorg.apache.camel.ExtendedExchange
-
addOnCompletion
public void addOnCompletion(org.apache.camel.spi.Synchronization onCompletion)
- Specified by:
addOnCompletionin interfaceorg.apache.camel.ExtendedExchange
-
containsOnCompletion
public boolean containsOnCompletion(org.apache.camel.spi.Synchronization onCompletion)
- Specified by:
containsOnCompletionin interfaceorg.apache.camel.ExtendedExchange
-
handoverCompletions
public void handoverCompletions(org.apache.camel.Exchange target)
- Specified by:
handoverCompletionsin interfaceorg.apache.camel.ExtendedExchange
-
handoverCompletions
public List<org.apache.camel.spi.Synchronization> handoverCompletions()
- Specified by:
handoverCompletionsin interfaceorg.apache.camel.ExtendedExchange
-
getHistoryNodeId
public String getHistoryNodeId()
- Specified by:
getHistoryNodeIdin interfaceorg.apache.camel.ExtendedExchange
-
setHistoryNodeId
public void setHistoryNodeId(String historyNodeId)
- Specified by:
setHistoryNodeIdin interfaceorg.apache.camel.ExtendedExchange
-
getHistoryNodeLabel
public String getHistoryNodeLabel()
- Specified by:
getHistoryNodeLabelin interfaceorg.apache.camel.ExtendedExchange
-
setHistoryNodeLabel
public void setHistoryNodeLabel(String historyNodeLabel)
- Specified by:
setHistoryNodeLabelin interfaceorg.apache.camel.ExtendedExchange
-
isNotifyEvent
public boolean isNotifyEvent()
- Specified by:
isNotifyEventin interfaceorg.apache.camel.ExtendedExchange
-
setNotifyEvent
public void setNotifyEvent(boolean notifyEvent)
- Specified by:
setNotifyEventin interfaceorg.apache.camel.ExtendedExchange
-
isInterrupted
public boolean isInterrupted()
- Specified by:
isInterruptedin interfaceorg.apache.camel.ExtendedExchange
-
setInterrupted
public void setInterrupted(boolean interrupted)
- Specified by:
setInterruptedin interfaceorg.apache.camel.ExtendedExchange
-
setInterruptable
public void setInterruptable(boolean interruptable)
- Specified by:
setInterruptablein interfaceorg.apache.camel.ExtendedExchange
-
isRedeliveryExhausted
public boolean isRedeliveryExhausted()
- Specified by:
isRedeliveryExhaustedin interfaceorg.apache.camel.ExtendedExchange
-
setRedeliveryExhausted
public void setRedeliveryExhausted(boolean redeliveryExhausted)
- Specified by:
setRedeliveryExhaustedin interfaceorg.apache.camel.ExtendedExchange
-
getErrorHandlerHandled
public Boolean getErrorHandlerHandled()
- Specified by:
getErrorHandlerHandledin interfaceorg.apache.camel.ExtendedExchange
-
isErrorHandlerHandledSet
public boolean isErrorHandlerHandledSet()
- Specified by:
isErrorHandlerHandledSetin interfaceorg.apache.camel.ExtendedExchange
-
isErrorHandlerHandled
public boolean isErrorHandlerHandled()
- Specified by:
isErrorHandlerHandledin interfaceorg.apache.camel.ExtendedExchange
-
setErrorHandlerHandled
public void setErrorHandlerHandled(Boolean errorHandlerHandled)
- Specified by:
setErrorHandlerHandledin interfaceorg.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:
copyInternalPropertiesin interfaceorg.apache.camel.ExtendedExchange
-
getInternalProperties
public Map<String,Object> getInternalProperties()
- Specified by:
getInternalPropertiesin interfaceorg.apache.camel.ExtendedExchange
-
getDefaultConsumerCallback
public org.apache.camel.AsyncCallback getDefaultConsumerCallback()
- Specified by:
getDefaultConsumerCallbackin interfaceorg.apache.camel.ExtendedExchange
-
setDefaultConsumerCallback
public void setDefaultConsumerCallback(org.apache.camel.AsyncCallback defaultConsumerCallback)
- Specified by:
setDefaultConsumerCallbackin interfaceorg.apache.camel.ExtendedExchange
-
createExchangeId
protected String createExchangeId()
-
setSafeCopyProperty
public void setSafeCopyProperty(String key, org.apache.camel.SafeCopyProperty value)
- Specified by:
setSafeCopyPropertyin interfaceorg.apache.camel.ExtendedExchange
-
-