类 AbstractMessageEndpointFactory.AbstractMessageEndpoint
- java.lang.Object
- org.springframework.jca.endpoint.AbstractMessageEndpointFactory.AbstractMessageEndpoint
- 所有已实现的接口:
MessageEndpoint
protected abstract class AbstractMessageEndpointFactory.AbstractMessageEndpoint extends Object implements MessageEndpoint
Inner class for actual endpoint implementations, based on template method to allow for any kind of concrete endpoint implementation.
构造器概要
构造器 限定符 构造器 说明 protectedAbstractMessageEndpoint()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 voidafterDelivery()ThisafterDeliveryimplementation resets the thread context ClassLoader and completes the transaction, if any.voidbeforeDelivery(Method method)ThisbeforeDeliveryimplementation starts a transaction, if necessary, and exposes the endpoint ClassLoader as current thread context ClassLoader.protected abstract ClassLoadergetEndpointClassLoader()Template method for exposing the endpoint's ClassLoader (typically the ClassLoader that the message listener class has been loaded with).protected booleanhasBeforeDeliveryBeenCalled()Return whether thebeforeDelivery(java.lang.reflect.Method)method of this endpoint has already been called.protected voidonEndpointException(Throwable ex)Callback method for notifying the endpoint base class that the concrete endpoint invocation led to an exception.voidrelease()
构造器详细资料
AbstractMessageEndpoint
protected AbstractMessageEndpoint()
方法详细资料
beforeDelivery
public void beforeDelivery(@Nullable Method method) throws ResourceException
ThisbeforeDeliveryimplementation starts a transaction, if necessary, and exposes the endpoint ClassLoader as current thread context ClassLoader.Note that the JCA 1.7 specification does not require a ResourceAdapter to call this method before invoking the concrete endpoint. If this method has not been called (check
hasBeforeDeliveryBeenCalled()), the concrete endpoint method should callbeforeDeliveryand its siblingafterDelivery()explicitly, as part of its own processing.- 指定者:
beforeDelivery在接口中MessageEndpoint- 抛出:
ResourceException
getEndpointClassLoader
protected abstract ClassLoader getEndpointClassLoader()
Template method for exposing the endpoint's ClassLoader (typically the ClassLoader that the message listener class has been loaded with).- 返回:
- the endpoint ClassLoader (never
null)
hasBeforeDeliveryBeenCalled
protected final boolean hasBeforeDeliveryBeenCalled()
Return whether thebeforeDelivery(java.lang.reflect.Method)method of this endpoint has already been called.
onEndpointException
protected void onEndpointException(Throwable ex)
Callback method for notifying the endpoint base class that the concrete endpoint invocation led to an exception.To be invoked by subclasses in case of the concrete endpoint throwing an exception.
- 参数:
ex- the exception thrown from the concrete endpoint
afterDelivery
public void afterDelivery() throws ResourceException
ThisafterDeliveryimplementation resets the thread context ClassLoader and completes the transaction, if any.Note that the JCA 1.7 specification does not require a ResourceAdapter to call this method after invoking the concrete endpoint. See the explanation in
beforeDelivery(java.lang.reflect.Method)'s javadoc.- 指定者:
afterDelivery在接口中MessageEndpoint- 抛出:
ResourceException
release
public void release()
- 指定者:
release在接口中MessageEndpoint