This abstract class is used as the base for a MessageExchange reference
given to a Binding or Engine. The binding and engine are given different
instances, because the states naviagated during execution are different.
Each instance also tracks its twin.
It's mostly just a proxy to the underlying MessageExchangeImpl. The proxy
tracks the status of the reference to determine which operations are legal
at any point in time. Legal operations are forwarded to the underlying
MessageExchangeImpl.
Each subclass is expected to specify a state machine that will be used
by this proxy to sequence the actions. The state machine is very simple.
There are only 4 actions: SEND, ACCEPT, SET_STATUS, SET_FAULT.
Along with each state there is a set (implemented as a bit-mask) of
operations that are legal in the current state. The structure is
represented as a simple [][]. The first dimension is the array of
states, the second dimension contains the valid set, followed by the
next array index for each action. An index of -1 means an illegal
request (the code in here should only request legal transisions.)
Each subclass implements 2 state machines, one for the SOURCE side and
one for the TARGET side of a message exchange.
author: Sun Microsystems, Inc.
Get the Endpoint for this exchange. If a service connection was used
to address this exchange, that endpoint is returned to the consumer. The
provider always sees the 'real' endpoint that it activated. If a service
connection was not used, the provider and consumer see the same endpoint.