Package org.apache.camel
Interface ExtendedExchange
-
- All Superinterfaces:
Exchange
- All Known Subinterfaces:
PooledExchange
public interface ExtendedExchange extends Exchange
ExtendedExchangewhich contains the methods and APIs that are not intended for Camel end users but used internally by Camel for optimization purposes, SPI, custom components, or more advanced used-cases with Camel.
-
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddOnCompletion(Synchronization onCompletion)Adds aSynchronizationto be invoked as callback when this exchange is completed.booleancontainsOnCompletion(Synchronization onCompletion)Checks if the passedSynchronizationinstance is already contained on this exchange.voidcopyInternalProperties(Exchange target)To copy the internal properties from this exchange to the target exchangevoidcopySafeCopyPropertiesTo(ExtendedExchange target)Copy the safe copy properties from this exchange to the target exchangeAsyncCallbackgetDefaultConsumerCallback()Callback used byConsumerif the consumer is completing the exchange processing with default behaviour.BooleangetErrorHandlerHandled()Whether the exchange has been handled by the error handler.StringgetHistoryNodeId()Gets the history node id (the current processor that will process the exchange)StringgetHistoryNodeLabel()Gets the history node label (the current processor that will process the exchange)StringgetHistoryNodeSource()Gets the history node source:line-number where the node is located in the source code (the current processor that will process the exchange).<T> TgetInOrNull(Class<T> type)If there is an existing inbound message of the given type then return it as-is, otherwise return null.Map<String,Object>getInternalProperties()Gets the internal properties from this exchange.<T> TgetSafeCopyProperty(String key, Class<T> type)To get a property that was copied specially (thread safe with deep cloning).List<Synchronization>handoverCompletions()Handover all the on completions from this exchangevoidhandoverCompletions(Exchange target)Handover all the on completions from this exchange to the target exchange.booleanisErrorHandlerHandled()Whether the exchange has been handled by the error handler.booleanisErrorHandlerHandledSet()Whether the error handler handled flag has been set.booleanisInterrupted()Whether the exchange was interrupted (InterruptException) during routing.booleanisNotifyEvent()Whether the exchange is currently used as event notification.booleanisRedeliveryExhausted()Whether the exchange has exhausted (attempted all) its redeliveries and still failed.booleanisStreamCacheDisabled()Is stream caching disabled on the given exchangevoidsetDefaultConsumerCallback(AsyncCallback callback)Callback used byConsumerif the consumer is completing the exchange processing with default behaviour.voidsetErrorHandlerHandled(Boolean errorHandlerHandled)Used to signal that this exchange has been handled by the error handler.voidsetFromEndpoint(Endpoint fromEndpoint)Sets the endpoint which originated this message exchange.voidsetFromRouteId(String fromRouteId)Sets the route id which originated this message exchange.voidsetHistoryNodeId(String historyNodeId)Sets the history node id (the current processor that will process the exchange)voidsetHistoryNodeLabel(String historyNodeLabel)Sets the history node label (the current processor that will process the exchange)voidsetHistoryNodeSource(String historyNodeSource)Sets the history node source:line-number where the node is located in the source code (the current processor that will process the exchange).voidsetInterruptable(boolean interruptable)To control whether the exchange can accept being interrupted currently.voidsetInterrupted(boolean interrupted)Used to signal that this exchange was interrupted (InterruptException) during routing.voidsetNotifyEvent(boolean notifyEvent)Sets whether the exchange is currently used as event notification and if so then this should not generate additional events.voidsetProperties(Map<String,Object> properties)Sets the properties on the exchangevoidsetRedeliveryExhausted(boolean redeliveryExhausted)Used to signal that this exchange has exhausted (attempted all) its redeliveries and still failed.voidsetSafeCopyProperty(String key, SafeCopyProperty value)To set a property that must be copied specially (thread safe with deep cloning).voidsetStreamCacheDisabled(boolean streamCacheDisabled)Used to force disabling stream caching which some components can do in special use-cases.voidsetTransacted(boolean transacted)Sets whether the exchange is routed in a transaction.voidsetUnitOfWork(UnitOfWork unitOfWork)Sets the unit of work that this exchange belongs to; which may map to zero, one or more physical transactions-
Methods inherited from interface org.apache.camel.Exchange
adapt, copy, getAllProperties, getContext, getCreated, getException, getException, getExchangeId, getFromEndpoint, getFromRouteId, getIn, getIn, getMessage, getMessage, getOut, getOut, getPattern, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getUnitOfWork, hasOut, hasProperties, isExternalRedelivered, isFailed, isRollbackOnly, isRollbackOnlyLast, isRouteStop, isTransacted, removeProperties, removeProperties, removeProperty, removeProperty, setException, setExchangeId, setIn, setMessage, setOut, setPattern, setProperty, setProperty, setRollbackOnly, setRollbackOnlyLast, setRouteStop
-
-
-
-
Method Detail
-
getInOrNull
<T> T getInOrNull(Class<T> type)
If there is an existing inbound message of the given type then return it as-is, otherwise return null.- Parameters:
type- the given type- Returns:
- the message if exists with the given type, otherwise null.
-
setFromEndpoint
void setFromEndpoint(Endpoint fromEndpoint)
Sets the endpoint which originated this message exchange. This method should typically only be called byEndpointimplementations
-
setFromRouteId
void setFromRouteId(String fromRouteId)
Sets the route id which originated this message exchange. This method should typically only be called by the internal framework.
-
setUnitOfWork
void setUnitOfWork(UnitOfWork unitOfWork)
Sets the unit of work that this exchange belongs to; which may map to zero, one or more physical transactions
-
setProperties
void setProperties(Map<String,Object> properties)
Sets the properties on the exchange
-
addOnCompletion
void addOnCompletion(Synchronization onCompletion)
Adds aSynchronizationto be invoked as callback when this exchange is completed.- Parameters:
onCompletion- the callback to invoke on completion of this exchange
-
containsOnCompletion
boolean containsOnCompletion(Synchronization onCompletion)
Checks if the passedSynchronizationinstance is already contained on this exchange.- Parameters:
onCompletion- the callback instance that is being checked for- Returns:
- true, if callback instance is already contained on this exchange, else false
-
handoverCompletions
void handoverCompletions(Exchange target)
Handover all the on completions from this exchange to the target exchange.
-
handoverCompletions
List<Synchronization> handoverCompletions()
Handover all the on completions from this exchange
-
setHistoryNodeId
void setHistoryNodeId(String historyNodeId)
Sets the history node id (the current processor that will process the exchange)
-
getHistoryNodeId
String getHistoryNodeId()
Gets the history node id (the current processor that will process the exchange)
-
setHistoryNodeLabel
void setHistoryNodeLabel(String historyNodeLabel)
Sets the history node label (the current processor that will process the exchange)
-
getHistoryNodeLabel
String getHistoryNodeLabel()
Gets the history node label (the current processor that will process the exchange)
-
getHistoryNodeSource
String getHistoryNodeSource()
Gets the history node source:line-number where the node is located in the source code (the current processor that will process the exchange).
-
setHistoryNodeSource
void setHistoryNodeSource(String historyNodeSource)
Sets the history node source:line-number where the node is located in the source code (the current processor that will process the exchange).
-
isStreamCacheDisabled
boolean isStreamCacheDisabled()
Is stream caching disabled on the given exchange
-
setStreamCacheDisabled
void setStreamCacheDisabled(boolean streamCacheDisabled)
Used to force disabling stream caching which some components can do in special use-cases.
-
setTransacted
void setTransacted(boolean transacted)
Sets whether the exchange is routed in a transaction.
-
isNotifyEvent
boolean isNotifyEvent()
Whether the exchange is currently used as event notification.
-
setNotifyEvent
void setNotifyEvent(boolean notifyEvent)
Sets whether the exchange is currently used as event notification and if so then this should not generate additional events.
-
isInterrupted
boolean isInterrupted()
Whether the exchange was interrupted (InterruptException) during routing.
-
setInterrupted
void setInterrupted(boolean interrupted)
Used to signal that this exchange was interrupted (InterruptException) during routing.
-
setInterruptable
void setInterruptable(boolean interruptable)
To control whether the exchange can accept being interrupted currently.
-
isRedeliveryExhausted
boolean isRedeliveryExhausted()
Whether the exchange has exhausted (attempted all) its redeliveries and still failed. This is used internally by Camel.
-
setRedeliveryExhausted
void setRedeliveryExhausted(boolean redeliveryExhausted)
Used to signal that this exchange has exhausted (attempted all) its redeliveries and still failed. This is used internally by Camel.
-
isErrorHandlerHandled
boolean isErrorHandlerHandled()
Whether the exchange has been handled by the error handler. This is used internally by Camel. Important: CallisErrorHandlerHandledSet()first before this method.- See Also:
isErrorHandlerHandledSet()
-
isErrorHandlerHandledSet
boolean isErrorHandlerHandledSet()
Whether the error handler handled flag has been set.
-
getErrorHandlerHandled
Boolean getErrorHandlerHandled()
Whether the exchange has been handled by the error handler. This is used internally by Camel.
-
setErrorHandlerHandled
void setErrorHandlerHandled(Boolean errorHandlerHandled)
Used to signal that this exchange has been handled by the error handler. This is used internally by Camel.
-
copyInternalProperties
void copyInternalProperties(Exchange target)
To copy the internal properties from this exchange to the target exchange This method is only intended for Camel internally.- Parameters:
target- the target exchange
-
getInternalProperties
Map<String,Object> getInternalProperties()
Gets the internal properties from this exchange. The known set of internal keys is defined inExchangePropertyKey. This method is only intended for Camel internally.- Returns:
- all the internal properties in a Map
-
getDefaultConsumerCallback
AsyncCallback getDefaultConsumerCallback()
Callback used byConsumerif the consumer is completing the exchange processing with default behaviour. This is only used when pooled exchange is enabled for optimization and reducing object allocations.
-
setDefaultConsumerCallback
void setDefaultConsumerCallback(AsyncCallback callback)
Callback used byConsumerif the consumer is completing the exchange processing with default behaviour. This is only used when pooled exchange is enabled for optimization and reducing object allocations.
-
setSafeCopyProperty
void setSafeCopyProperty(String key, SafeCopyProperty value)
To set a property that must be copied specially (thread safe with deep cloning).- See Also:
SafeCopyProperty
-
getSafeCopyProperty
<T> T getSafeCopyProperty(String key, Class<T> type)
To get a property that was copied specially (thread safe with deep cloning).- See Also:
SafeCopyProperty
-
copySafeCopyPropertiesTo
void copySafeCopyPropertiesTo(ExtendedExchange target)
Copy the safe copy properties from this exchange to the target exchange
-
-