public class GenericMessageEndpointFactory extends AbstractMessageEndpointFactory
MessageEndpointFactory
interface,
providing transaction management capabilities for any kind of message
listener object (e.g. MessageListener
objects or
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
ResourceAdapter
instance.
setMessageListener(java.lang.Object)
,
AbstractMessageEndpointFactory.setTransactionManager(java.lang.Object)
,
GenericMessageEndpointManager
Modifier and Type | Class and Description |
---|---|
static class |
GenericMessageEndpointFactory.InternalResourceException
Internal exception thrown when a ResourceException has been encountered
during the endpoint invocation.
|
AbstractMessageEndpointFactory.AbstractMessageEndpoint
logger
Constructor and Description |
---|
GenericMessageEndpointFactory() |
Modifier and Type | Method and Description |
---|---|
MessageEndpoint |
createEndpoint(XAResource xaResource)
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.AbstractMessageEndpoint |
createEndpointInternal()
Creates a concrete generic message endpoint, internal to this factory.
|
void |
setMessageListener(Object messageListener)
Specify the message listener object that the endpoint should expose
(e.g.
|
createEndpoint, isDeliveryTransacted, setTransactionFactory, setTransactionManager, setTransactionName, setTransactionTimeout
public void setMessageListener(Object messageListener)
MessageListener
objects or
MessageListener
implementation).public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException
createEndpoint
in interface MessageEndpointFactory
createEndpoint
in class AbstractMessageEndpointFactory
UnavailableException
protected AbstractMessageEndpointFactory.AbstractMessageEndpoint createEndpointInternal() throws UnavailableException
createEndpointInternal
in class AbstractMessageEndpointFactory
null
)UnavailableException
- if no endpoint is available at present