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.
|
protected java.lang.Object |
getMessageListener()
Return the message listener object for this endpoint.
|
void |
setMessageListener(java.lang.Object messageListener)
Specify the message listener object that the endpoint should expose
(e.g.
|
createEndpoint, getActivationName, getEndpointClass, isDeliveryTransacted, setBeanName, setTransactionFactory, setTransactionManager, setTransactionName, setTransactionTimeout
public void setMessageListener(java.lang.Object messageListener)
MessageListener
objects or
MessageListener
implementation).protected java.lang.Object getMessageListener()
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