public class EndpointHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected BaseMdbContainer |
container |
protected java.lang.Object |
instance |
protected java.lang.Boolean |
isAmq |
protected org.apache.openejb.core.mdb.State |
state |
Constructor and Description |
---|
EndpointHandler(BaseMdbContainer container,
BeanContext deployment,
MdbInstanceFactory instanceFactory,
javax.transaction.xa.XAResource xaResource) |
Modifier and Type | Method and Description |
---|---|
void |
afterDelivery()
This is called by a resource adapter after a message is delivered.
|
void |
beforeDelivery(java.lang.reflect.Method method)
This is called by a resource adapter before a message is delivered.
|
java.lang.Object |
deliverMessage(java.lang.reflect.Method method,
java.lang.Object[] args) |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
protected void |
recreateInstance(boolean exceptionAlreadyThrown) |
void |
release()
This method may be called by the resource adapter to indicate that it
no longer needs a proxy endpoint instance.
|
protected org.apache.openejb.core.mdb.State state
protected volatile java.lang.Boolean isAmq
protected java.lang.Object instance
protected final BaseMdbContainer container
public EndpointHandler(BaseMdbContainer container, BeanContext deployment, MdbInstanceFactory instanceFactory, javax.transaction.xa.XAResource xaResource) throws UnavailableException
UnavailableException
public void beforeDelivery(java.lang.reflect.Method method) throws ApplicationServerInternalException
MessageEndpoint
beforeDelivery
in interface MessageEndpoint
method
- description of a target method. This information about
the intended target method allows an application server to decide
whether to start a transaction during this method call, depending
on the transaction preferences of the target method.
The processing (by the application server) of the actual message
delivery method call on the endpoint must be independent of the
class loader associated with this descriptive method object.ApplicationServerInternalException
- indicates an error
condition in the application server.protected void recreateInstance(boolean exceptionAlreadyThrown) throws UnavailableException
UnavailableException
public void release()
MessageEndpoint
release
in interface MessageEndpoint
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
public java.lang.Object deliverMessage(java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
java.lang.Throwable
public void afterDelivery() throws ApplicationServerInternalException, UnavailableException
MessageEndpoint
afterDelivery
in interface MessageEndpoint
ApplicationServerInternalException
- indicates an error
condition in the application server.UnavailableException
- indicates that the endpoint is not
available.