org.apache.ode.bpel.iapi
Interface MyRoleMessageExchange

All Superinterfaces:
MessageExchange
All Known Implementing Classes:
BrokeredReliableMyRoleMessageExchangeImpl, BrokeredTransactedMyRoleMessageExchangeImpl, BrokeredUnreliableMyRoleMessageExchangeImpl, TransactedMyRoleMessageExchangeImpl, UnreliableMyRoleMessageExchangeImpl

public interface MyRoleMessageExchange
extends MessageExchange

Extension of the MessageExchange interface that is provided by the engine for message-exchanges where the engine acts as the server (i.e. where the engine is "invoked").


Nested Class Summary
static class MyRoleMessageExchange.CorrelationStatus
          Enumeration of message correlation results.
 
Nested classes/interfaces inherited from interface org.apache.ode.bpel.iapi.MessageExchange
MessageExchange.AckType, MessageExchange.FailureType, MessageExchange.MessageExchangePattern, MessageExchange.Status
 
Field Summary
 
Fields inherited from interface org.apache.ode.bpel.iapi.MessageExchange
PROPERTY_SEP_MYROLE_SESSIONID, PROPERTY_SEP_MYROLE_TRANSACTED, PROPERTY_SEP_PARTNERROLE_EPR, PROPERTY_SEP_PARTNERROLE_SESSIONID
 
Method Summary
 void complete()
          Complete the message, exchange: indicates that the client has receive the response (if any).
 java.lang.String getClientId()
          Get the previously associated client key for this exchange.
 MyRoleMessageExchange.CorrelationStatus getCorrelationStatus()
          Get the correlation state of the the invocation.
 MessageExchange.FailureType getFailureType()
          Get the type of failure.
 javax.xml.namespace.QName getServiceName()
          Get the name of the service targetted in this message exchange.
 java.util.concurrent.Future<MessageExchange.Status> invokeAsync()
          Invoke a processs asynchronously.
 MessageExchange.Status invokeBlocking()
          Invoke a process hosted by the BPEL engine, blocking until the operation completes.
 void invokeReliable()
          Invoke a reliable process: this method must be invoked in a transaction.
 MessageExchange.Status invokeTransacted()
          Invoke a transactional process: this method must be invoked in a transaction.
 void release(boolean instanceSucceeded)
           
 void setRequest(Message request)
           
 
Methods inherited from interface org.apache.ode.bpel.iapi.MessageExchange
createMessage, getAckType, getEndpointReference, getFault, getFaultExplanation, getFaultResponse, getInvocationStyle, getMessageExchangeId, getMessageExchangePattern, getOperation, getOperationName, getPortType, getProperty, getPropertyNames, getRequest, getResponse, getStatus, getTimeout, isSafe, isTransactional, release, setProperty, setTimeout
 

Method Detail

getCorrelationStatus

MyRoleMessageExchange.CorrelationStatus getCorrelationStatus()
Get the correlation state of the the invocation. An invocation will either create a new process instance, match an existing instance, or be queued for consumption by an instance in the future (see CorrelationType for details).

Returns:
correlation state of the invocation

getFailureType

MessageExchange.FailureType getFailureType()
Get the type of failure. Only usable if AckType is FAILURE.

Returns:

setRequest

void setRequest(Message request)

invokeBlocking

MessageExchange.Status invokeBlocking()
                                      throws BpelEngineException,
                                             java.util.concurrent.TimeoutException
Invoke a process hosted by the BPEL engine, blocking until the operation completes.

Returns:
the final status of the operation
Throws:
BpelEngineException
java.util.concurrent.TimeoutException

invokeTransacted

MessageExchange.Status invokeTransacted()
                                        throws BpelEngineException
Invoke a transactional process: this method must be invoked in a transaction. The invoking thread will be blocked for the duration of the call.

Returns:
the final status of the operation (provided that commit succeedes)
Throws:
BpelEngineException

invokeReliable

void invokeReliable()
Invoke a reliable process: this method must be invoked in a transaction. The invoking thread will not be blocked. When the response is available, it will be provided via the MessageExchangeContext#onReliableReply(MyRoleMessageExchange).


invokeAsync

java.util.concurrent.Future<MessageExchange.Status> invokeAsync()
Invoke a processs asynchronously. This method will start an operation, but will not block; instead a future object is returned.

Returns:

complete

void complete()
Complete the message, exchange: indicates that the client has receive the response (if any).


getClientId

java.lang.String getClientId()
Get the previously associated client key for this exchange.

Returns:

getServiceName

javax.xml.namespace.QName getServiceName()
Get the name of the service targetted in this message exchange.

Returns:
service name

release

void release(boolean instanceSucceeded)