jakarta.resource.spi.endpoint.MessageEndpointFactory interface,
providing transaction management capabilities for any kind of message
listener object (e.g. jakarta.jms.MessageListener objects or
jakarta.resource.cci.MessageListener objects).
Uses AOP proxies for concrete endpoint instances, simply wrapping the specified message listener object and exposing all of its implemented interfaces on the endpoint instance.
Typically used with Spring's GenericMessageEndpointManager,
but not tied to it. As a consequence, this endpoint factory could
also be used with programmatic endpoint management on a native
jakarta. instance.
setMessageListener, setTransactionManager, GenericMessageEndpointManager
| Modifier and Type | Class and Description |
|---|---|
| private class | GenericMessageEndpointFactory.
Private inner class that implements the concrete generic message endpoint, as an AOP Alliance MethodInterceptor that will be invoked by a proxy. |
| public static class | GenericMessageEndpointFactory.
Internal exception thrown when a ResourceException has been encountered during the endpoint invocation. |
| Modifier and Type | Field and Description |
|---|---|
| private Object |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public MessageEndpoint | createEndpoint(XAResource
an optional xaResource)XAResource
instance used to get transaction notifications when the message delivery
is transacted.Overrides org. Implements jakarta. Wrap each concrete endpoint instance with an AOP proxy, exposing the message listener's interfaces as well as the endpoint SPI through an AOP introduction. |
| protected AbstractMessageEndpointFactory. | createEndpointInternal()
Implements abstract org. Creates a concrete generic message endpoint, internal to this factory. |
| protected Object | |
| public void | setMessageListener(Object messageListener)
Specify the message listener object that the endpoint should expose
(e.g. a |
| messageListener | back to summary |
|---|---|
| private Object messageListener
| |
| GenericMessageEndpointFactory | back to summary |
|---|---|
| public GenericMessageEndpointFactory() | |
| createEndpoint | back to summary |
|---|---|
| public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException Overrides org. Implements jakarta. Wrap each concrete endpoint instance with an AOP proxy, exposing the message listener's interfaces as well as the endpoint SPI through an AOP introduction.
| |
| createEndpointInternal | back to summary |
|---|---|
| protected AbstractMessageEndpointFactory. Implements abstract org. Creates a concrete generic message endpoint, internal to this factory.
| |
| getMessageListener | back to summary |
|---|---|
| protected Object getMessageListener() Return the message listener object for this endpoint.
| |
| setMessageListener | back to summary |
|---|---|
| public void setMessageListener(Object messageListener) Specify the message listener object that the endpoint should expose
(e.g. a | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private Exception | |
| protected ClassLoader | getEndpointClassLoader()
Implements abstract org. Template method for exposing the endpoint's ClassLoader (typically the ClassLoader that the message listener class has been loaded with). |
| public Object | invoke(MethodInvocation
the method invocation joinpoint methodInvocation)Implements org. Implement this method to perform extra treatments before and after the invocation. |
| GenericMessageEndpoint | back to summary |
|---|---|
| private GenericMessageEndpoint() | |
| adaptExceptionIfNecessary | back to summary |
|---|---|
| private Exception adaptExceptionIfNecessary(MethodInvocation methodInvocation, ResourceException ex) | |
| getEndpointClassLoader | back to summary |
|---|---|
| protected ClassLoader getEndpointClassLoader() Implements abstract org. Template method for exposing the endpoint's ClassLoader (typically the ClassLoader that the message listener class has been loaded with).
| |
| invoke | back to summary |
|---|---|
| public Object invoke(MethodInvocation methodInvocation) throws Throwable Implements org. Doc from org. Implement this method to perform extra treatments before and
after the invocation. Polite implementations would certainly
like to invoke
| |
Will only be used if the ResourceAdapter does not invoke the
endpoint's beforeDelivery and afterDelivery
directly, leaving it up to the concrete endpoint to apply those -
and to handle any ResourceExceptions thrown from them.
| Access | Constructor and Description |
|---|---|
| public |
| InternalResourceException | back to summary |
|---|---|
| public InternalResourceException(ResourceException cause) | |