public interface Exchange
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_TYPE
Context property name used for Message Content Type.
|
static String |
FAULT_TYPE
Context property name used for Fault Type.
|
static String |
MESSAGE_ID
Context property name used for Message ID.
|
static String |
OPERATION_NAME
Context property name used for Operation Name.
|
static String |
PROPAGATE_EXCEPTION_ON_IN_ONLY
Domain property name used for a boolean flag which indicates if the exception should
be propagate back to the service consumer.
|
static String |
RELATES_TO
Context property name used for Relates To.
|
static String |
ROLLBACK_ON_FAULT
Context property name used for A boolean flag which indicates if the transaction should
be rolled back or not on fault.
|
static String |
SERVICE_NAME
Context property name used for Service Name.
|
Modifier and Type | Method and Description |
---|---|
Exchange |
consumer(ServiceReference consumer,
ServiceOperation operation)
Set service consumer info for this exchange.
|
Message |
createMessage()
Create a message to be used with this exchange.
|
ServiceReference |
getConsumer()
Get the service reference representing the consumer.
|
Context |
getContext()
Retrieves the exchange context.
|
Context |
getContext(Message message)
Retrieves context available for passed message.
|
ExchangeContract |
getContract()
The contract between consumer and provider for this exchange.
|
Message |
getMessage()
Returns the current message for the exchange.
|
ExchangePattern |
getPattern()
Provides the consumer's view of the message exchange pattern.
|
ExchangePhase |
getPhase()
Get the exchange phase.
|
Service |
getProvider()
Get the service representing the provider.
|
ExchangeHandler |
getReplyHandler()
Get the reply handler for this exchange.
|
ExchangeSecurity |
getSecurity()
Get the exchange security.
|
ExchangeState |
getState()
Get the exchange state.
|
Exchange |
provider(Service provider,
ServiceOperation operation)
Set service provider info for this exchange.
|
void |
send(Message message)
Sends the specified message as part of this message exchange.
|
void |
sendFault(Message message)
Sends the specified message as part of this message exchange.
|
static final String MESSAGE_ID
static final String RELATES_TO
static final String CONTENT_TYPE
static final String OPERATION_NAME
static final String FAULT_TYPE
static final String SERVICE_NAME
static final String ROLLBACK_ON_FAULT
static final String PROPAGATE_EXCEPTION_ON_IN_ONLY
Context getContext()
Context getContext(Message message)
getContext()
method, otherwise another instance of Context will be returned.message
- Message instance.ServiceReference getConsumer()
Service getProvider()
ExchangeContract getContract()
Exchange consumer(ServiceReference consumer, ServiceOperation operation)
consumer
- the service reference used by the exchangeoperation
- the operation being invokedExchange provider(Service provider, ServiceOperation operation)
provider
- the service provider used by the exchangeoperation
- the operation being invokedMessage getMessage()
Message createMessage()
void send(Message message)
IllegalStateException
if this method is
called when the Exchange state
is in ExchangeState.FAULT
.message
- message to sendvoid sendFault(Message message)
state
to ExchangeState.FAULT
.message
- message to sendExchangeState getState()
ExchangePhase getPhase()
ExchangeHandler getReplyHandler()
ExchangePattern getPattern()
ExchangeSecurity getSecurity()
Copyright © 2013–2021 JBoss by Red Hat. All rights reserved.