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.VariableAware
The default and only implementation of
Exchange.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.camel.CamelContextprotected Exceptionprotected Stringprotected org.apache.camel.Messageprotected org.apache.camel.Messageprotected org.apache.camel.ExchangePatternprotected booleanprotected booleanprotected booleanprotected org.apache.camel.support.ExchangeVariableRepositoryFields 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, ATTACHMENTS_SIZE, 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_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_LANGUAGE, 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, OTEL_ACTIVE_SPAN, OTEL_CLOSE_CLIENT_SCOPE, 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
ConstructorsConstructorDescriptionDefaultExchange(org.apache.camel.CamelContext context) DefaultExchange(org.apache.camel.CamelContext context, org.apache.camel.ExchangePattern pattern) DefaultExchange(org.apache.camel.Exchange parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureMessage(org.apache.camel.Message message) Configures the message after it has been set on the exchangeorg.apache.camel.Exchangecopy()protected Stringorg.apache.camel.clock.ClockgetClock()org.apache.camel.CamelContextlong<T> TgetException(Class<T> type) org.apache.camel.Endpointorg.apache.camel.MessagegetIn()<T> Torg.apache.camel.Message<T> TgetMessage(Class<T> type) org.apache.camel.MessagegetOut()<T> Torg.apache.camel.ExchangePatterngetProperty(String name) <T> TgetProperty(String name, Class<T> type) <T> TgetProperty(String name, Object defaultValue, Class<T> type) getProperty(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) org.apache.camel.spi.UnitOfWorkgetVariable(String name) <T> TgetVariable(String name, Class<T> type) <T> TgetVariable(String name, Object defaultValue, Class<T> type) booleanhasOut()booleanbooleanbooleanbooleanisFailed()booleanbooleanbooleanbooleanstatic DefaultExchangenewFromEndpoint(org.apache.camel.Endpoint fromEndpoint) static DefaultExchangenewFromEndpoint(org.apache.camel.Endpoint fromEndpoint, org.apache.camel.ExchangePattern exchangePattern) booleanremoveProperties(String pattern) booleanremoveProperties(String pattern, String... excludePatterns) removeProperty(String name) removeProperty(org.apache.camel.ExchangePropertyKey key) removeVariable(String name) voidvoidsetExchangeId(String id) voidsetIn(org.apache.camel.Message in) voidsetMessage(org.apache.camel.Message message) voidsetOut(org.apache.camel.Message out) voidsetPattern(org.apache.camel.ExchangePattern pattern) voidsetProperty(String name, Object value) voidsetProperty(org.apache.camel.ExchangePropertyKey key, Object value) voidsetRollbackOnly(boolean rollbackOnly) voidsetRollbackOnlyLast(boolean rollbackOnlyLast) voidsetRouteStop(boolean routeStop) voidsetVariable(String name, Object value) final StringtoString()
-
Field Details
-
internalProperties
-
context
protected final org.apache.camel.CamelContext context -
properties
-
in
protected org.apache.camel.Message in -
out
protected org.apache.camel.Message out -
exception
-
exchangeId
-
pattern
protected org.apache.camel.ExchangePattern pattern -
routeStop
protected boolean routeStop -
rollbackOnly
protected boolean rollbackOnly -
rollbackOnlyLast
protected boolean rollbackOnlyLast -
safeCopyProperties
-
variableRepository
protected org.apache.camel.support.ExchangeVariableRepository variableRepository
-
-
Constructor Details
-
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)
-
-
Method Details
-
getClock
public org.apache.camel.clock.Clock getClock() -
newFromEndpoint
-
newFromEndpoint
public static DefaultExchange newFromEndpoint(org.apache.camel.Endpoint fromEndpoint, org.apache.camel.ExchangePattern exchangePattern) -
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
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
- 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
- Specified by:
setPropertyin interfaceorg.apache.camel.Exchange
-
removeProperty
- Specified by:
removePropertyin interfaceorg.apache.camel.Exchange
-
getProperty
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
getProperty
- Specified by:
getPropertyin interfaceorg.apache.camel.Exchange
-
setProperty
- Specified by:
setPropertyin interfaceorg.apache.camel.Exchange
-
removeProperty
- Specified by:
removePropertyin interfaceorg.apache.camel.Exchange
-
removeProperties
- Specified by:
removePropertiesin interfaceorg.apache.camel.Exchange
-
removeProperties
- Specified by:
removePropertiesin interfaceorg.apache.camel.Exchange
-
getProperties
- Specified by:
getPropertiesin interfaceorg.apache.camel.Exchange
-
getAllProperties
- Specified by:
getAllPropertiesin interfaceorg.apache.camel.Exchange
-
hasProperties
public boolean hasProperties()- Specified by:
hasPropertiesin interfaceorg.apache.camel.Exchange
-
getVariable
- Specified by:
getVariablein interfaceorg.apache.camel.Exchange- Specified by:
getVariablein interfaceorg.apache.camel.VariableAware
-
getVariable
- Specified by:
getVariablein interfaceorg.apache.camel.Exchange
-
getVariable
- Specified by:
getVariablein interfaceorg.apache.camel.Exchange
-
setVariable
- Specified by:
setVariablein interfaceorg.apache.camel.Exchange- Specified by:
setVariablein interfaceorg.apache.camel.VariableAware
-
removeVariable
- Specified by:
removeVariablein interfaceorg.apache.camel.Exchange
-
getVariables
- Specified by:
getVariablesin interfaceorg.apache.camel.Exchange
-
hasVariables
public boolean hasVariables()- Specified by:
hasVariablesin interfaceorg.apache.camel.Exchange
-
getIn
public org.apache.camel.Message getIn()- Specified by:
getInin interfaceorg.apache.camel.Exchange
-
getIn
- Specified by:
getInin interfaceorg.apache.camel.Exchange
-
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
- 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
- Specified by:
getMessagein interfaceorg.apache.camel.Exchange
-
setMessage
public void setMessage(org.apache.camel.Message message) - Specified by:
setMessagein interfaceorg.apache.camel.Exchange
-
getException
- Specified by:
getExceptionin interfaceorg.apache.camel.Exchange
-
getException
- Specified by:
getExceptionin interfaceorg.apache.camel.Exchange
-
setException
- Specified by:
setExceptionin 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
-
getFromRouteId
- Specified by:
getFromRouteIdin interfaceorg.apache.camel.Exchange
-
getExchangeId
- Specified by:
getExchangeIdin interfaceorg.apache.camel.Exchange
-
setExchangeId
- 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
-
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
-
configureMessage
protected void configureMessage(org.apache.camel.Message message) Configures the message after it has been set on the exchange -
createExchangeId
-
toString
-
getExchangeExtension
- Specified by:
getExchangeExtensionin interfaceorg.apache.camel.Exchange
-