当前页面:
在线文档首页 >
Spring Framework 2.1.0 API 文档英文版
GenericMessageEndpointFactory (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版
org.springframework.jca.endpoint
Class GenericMessageEndpointFactory
java.lang.Object
org.springframework.jca.endpoint.AbstractMessageEndpointFactory
org.springframework.jca.endpoint.GenericMessageEndpointFactory
- All Implemented Interfaces:
- MessageEndpointFactory
public class GenericMessageEndpointFactory
- extends AbstractMessageEndpointFactory
Generic implementation of the JCA 1.5
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.
- Since:
- 2.1
- Author:
- Juergen Hoeller
- See Also:
setMessageListener(java.lang.Object)
,
AbstractMessageEndpointFactory.setTransactionManager(java.lang.Object)
,
GenericMessageEndpointManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericMessageEndpointFactory
public GenericMessageEndpointFactory()
setMessageListener
public void setMessageListener(Object messageListener)
- Specify the message listener object that the endpoint should expose
(e.g. a
MessageListener
objects or
MessageListener
implementation).
createEndpoint
public MessageEndpoint createEndpoint(XAResource xaResource)
throws UnavailableException
- 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.
- Specified by:
createEndpoint
in interface MessageEndpointFactory
- Overrides:
createEndpoint
in class AbstractMessageEndpointFactory
- Throws:
UnavailableException
createEndpointInternal
protected AbstractMessageEndpointFactory.AbstractMessageEndpoint createEndpointInternal()
throws UnavailableException
- Creates a concrete generic message endpoint, internal to this factory.
- Specified by:
createEndpointInternal
in class AbstractMessageEndpointFactory
- Returns:
- the actual endpoint instance (never
null
)
- Throws:
UnavailableException
- if no endpoint is available at present
Copyright © 2002-2007 The Spring Framework.