MessageEndpoint (Java EE 5)

Java EE API


javax.resource.spi.endpoint Interface MessageEndpoint


public interface MessageEndpoint


此类定义消息端点的协定。此类可以由应用服务器实现。
英文文档:

This defines a contract for a message endpoint. This is implemented by an application server.

Version:
1.0
Author:
Ram Jeyaraman

Method Summary
 void
 void
 void
 

Method Detail

public void beforeDelivery(Method method) throws NoSuchMethodException, ResourceException
在传送消息之前资源适配器调用此方法。
method 目标方法的描述。此信息与预期目标方法有关,它使应用服务器能够决定是否在调用此方法期间启动事务处理,具体取决于目标方法的事务处理首选项。对端点调用实际消息传送方法的处理(由应用服务器进行)必须独立于与此描述性方法对象关联的类加载器。
ThrowsNoSuchMethodException: 指示目标端点上不存在指定的方法。
ThrowsResourceException: 一般异常。
ThrowsApplicationServerInternalException: 指示应用服务器的错误情况。
ThrowsIllegalStateException: 指示方法调用时端点处于非法状态。例如,当不成对地调用 beforeDeliveryafterDelivery 方法时会发生这种情况。
ThrowsUnavailableException: 指示端点不可用。
英文文档:

beforeDelivery

void beforeDelivery(Method method)
                    throws NoSuchMethodException,
                           ResourceException
This is called by a resource adapter before a message is delivered.

Parameters:
method - description of a target method. This information about the intended target method allows an application server to decide whether to start a transaction during this method call, depending on the transaction preferences of the target method. The processing (by the application server) of the actual message delivery method call on the endpoint must be independent of the class loader associated with this descriptive method object.
Throws:
NoSuchMethodException - indicates that the specified method does not exist on the target endpoint.
ResourceException - generic exception.
ApplicationServerInternalException - indicates an error condition in the application server.
IllegalStateException - indicates that the endpoint is in an illegal state for the method invocation. For example, this occurs when beforeDelivery and afterDelivery method calls are not paired.
UnavailableException - indicates that the endpoint is not available.

public void afterDelivery() throws ResourceException
在传送消息之后资源适配器调用此方法。
ThrowsResourceException: 一般异常。
ThrowsApplicationServerInternalException: 指示应用服务器的错误情况。
ThrowsIllegalStateException: 指示方法调用时端点处于非法状态。例如,当不成对地调用 beforeDelivery 和 afterDelivery 方法时会发生这种情况。
ThrowsUnavailableException: 指示端点不可用。
英文文档:

afterDelivery

void afterDelivery()
                   throws ResourceException
This is called by a resource adapter after a message is delivered.

Throws:
ResourceException - generic exception.
ApplicationServerInternalException - indicates an error condition in the application server.
IllegalStateException - indicates that the endpoint is in an illegal state for the method invocation. For example, this occurs when beforeDelivery and afterDelivery method calls are not paired.
UnavailableException - indicates that the endpoint is not available.

public void release()
资源适配器可以调用此方法指示它不再需要代理端点实例。应用服务器可以使用此提示进行端点入池决定。
英文文档:

release

void release()
This method may be called by the resource adapter to indicate that it no longer needs a proxy endpoint instance. This hint may be used by the application server for endpoint pooling decisions.



Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!