Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ode.jbi
Class MessageExchangeContextImpl

    java.lang.Object
      org.apache.ode.jbi.MessageExchangeContextImpl

All Implemented Interfaces:
  MessageExchangeContext

    public class MessageExchangeContextImpl

extends java.lang.Object
implements MessageExchangeContext

Implementation of the ODE `MessageExchangeContext` interface. This class is used by the ODE engine to make invocation on JBI services provided by other engines (i.e. the BPEL engine is acting as client/consumer of services).

Constructor Summary
`MessageExchangeContextImpl(OdeContext ode)`

Method Summary
`void` | `cancel(PartnerRoleMessageExchange mex)` Cancel an async/reliable partner-role message exchange.
`java.util.Set<InvocationStyle>` | `getSupportedInvocationStyle(PartnerRoleChannel prc, EndpointReference partnerEpr)` Get the supported invocation styles (see `InvocationStyle`) for invoking the EPR provided via a given channel.
`void` | `invokePartnerReliable(PartnerRoleMessageExchange mex)`
`void` | `invokePartnerTransacted(PartnerRoleMessageExchange mex)`
`void` | `invokePartnerUnreliable(PartnerRoleMessageExchange mex)` Invoke a partner.
`void` | `onMyRoleMessageExchangeStateChanged(MyRoleMessageExchange myRoleMex)` Method used to inform the integration layer that the state of a my-role message exchange has changed.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MessageExchangeContextImpl

    public MessageExchangeContextImpl(OdeContext ode)

Method Detail

### invokePartnerUnreliable

    public void invokePartnerUnreliable(PartnerRoleMessageExchange mex)
                                 throws ContextException

  Description copied from interface: `MessageExchangeContext`

  Invoke a partner. This method is invoked by the BPEL engine when an `<invoke>` construct is encountered. The BPEL engine will only invoke this method from a transactional context. This method MUST NOT block for extended periods (as it is called from within a transaction): to this end, actual invocation may be deferred or a synchronous operation may be decomposed into two asynchronous "legs". The integration layer must provide a response to the message exchange via the `PartnerRoleMessageExchange.reply(Message)`, `PartnerRoleMessageExchange.replyOneWayOk()`, `PartnerRoleMessageExchange#replyWithFailure(FailureType, String, Element)` `PartnerRoleMessageExchange.replyWithFault(javax.xml.namespace.QName, Message)`, or `PartnerRoleMessageExchange#replyAsync()` methods.

  Invocation of reliable, unreliable, and transactional transports should be treated differently. A brief description of how each of these scenarios could be handled follows.

  Reliable transports are transports such as JMS or WS-RM. For these transports, the request should be enrolled in the current transaction. This necessarily implies that the request is deferred until the transaction is committed. It follows that for reliable request-response invocations the response to the invocation will necessarily be processed in a separate transaction.

  Unreliable transports are transports such as HTTP. For these transports, where the operation is not idempotent it is typically required that "at most once" semantics are achieved. To this end the invocation could be noted and deferred until after the transaction is committed.

  Transactional transports are those transports that support transaction propagation. For these transports, the invocation can be processed immediately and the response provided to the engine via the `PartnerRoleMessageExchange.reply(Message)` method.

  Specified by:
    `invokePartnerUnreliable` in interface `MessageExchangeContext`
  Parameters:
    `mex` - engine-provided partner role message exchange representation, this object is valid only for the duration of the transaction from which the `#invokePartner(PartnerRoleMessageExchange)` method is invoked
  Throws:
    `ContextException` - if the port does not support the operation

### invokePartnerReliable

    public void invokePartnerReliable(PartnerRoleMessageExchange mex)
                               throws ContextException

  Specified by:
    `invokePartnerReliable` in interface `MessageExchangeContext`
  Throws:
    `ContextException`

### invokePartnerTransacted

    public void invokePartnerTransacted(PartnerRoleMessageExchange mex)
                                 throws ContextException

  Specified by:
    `invokePartnerTransacted` in interface `MessageExchangeContext`
  Throws:
    `ContextException`

### cancel

    public void cancel(PartnerRoleMessageExchange mex)
                throws ContextException

  Description copied from interface: `MessageExchangeContext`
  Cancel an async/reliable partner-role message exchange.

  Specified by:
    `cancel` in interface `MessageExchangeContext`
  Parameters:
    `mex` - message exchange that should be cancelled.
  Throws:
    `ContextException`

### getSupportedInvocationStyle

    public java.util.Set<InvocationStyle> getSupportedInvocationStyle(PartnerRoleChannel prc,
                                                                      EndpointReference partnerEpr)

  Description copied from interface: `MessageExchangeContext`
  Get the supported invocation styles (see `InvocationStyle`) for invoking the EPR provided via a given channel.

  Specified by:
    `getSupportedInvocationStyle` in interface `MessageExchangeContext`
    `partnerEpr` - partner's EPR
  Returns:
    supported invocation styles

### onMyRoleMessageExchangeStateChanged

    public void onMyRoleMessageExchangeStateChanged(MyRoleMessageExchange myRoleMex)
                                             throws BpelEngineException

  Description copied from interface: `MessageExchangeContext`
  Method used to inform the integration layer that the state of a my-role message exchange has changed. This method is handy for implementations that need to survive system shutdowns.

  Specified by:
    `onMyRoleMessageExchangeStateChanged` in interface `MessageExchangeContext`
  Throws:
    `BpelEngineException`
  See Also:
    `MyRoleMessageExchange#invoke(Message)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD