MessageEndpointFactory (Java EE 5)

Java EE API


javax.resource.spi.endpoint Interface MessageEndpointFactory


public interface MessageEndpointFactory


此类用于创建消息端点的工厂。
英文文档:

This serves as a factory for creating message endpoints.

Version:
1.0
Author:
Ram Jeyaraman

Method Summary
 MessageEndpoint
 boolean
 

Method Detail

public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException
此方法用于创建消息端点。消息端点应该实现正确的消息侦听器类型。
xaResource 当消息传送是事务性时,用来获取事务处理通知的可选 XAResource 实例。
return 消息端点实例。
ThrowsUnavailableException: 指示创建消息端点时出现暂时故障。后续尝试创建消息端点可能成功。
英文文档:

createEndpoint

MessageEndpoint createEndpoint(XAResource xaResource)
                               throws UnavailableException
This is used to create a message endpoint. The message endpoint is expected to implement the correct message listener type.

Parameters:
xaResource - an optional XAResource instance used to get transaction notifications when the message delivery is transacted.
Returns:
a message endpoint instance.
Throws:
UnavailableException - indicates a transient failure in creating a message endpoint. Subsequent attempts to create a message endpoint might succeed.

public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException
此方法用于确定,传送到目标方法(位于消息端点实现的消息侦听器接口上)的消息是否将是事务性的。 该消息端点可以通过其部署描述符指出其事务性传送首选项(每个方法级别)。在消息端点的生命周期内不得更改消息传送首选项。
method 目标方法的描述。此信息与预期目标方法有关,它使应用服务器能够确定目标方法调用是否将是事务性的。
ThrowsNoSuchMethodException: 指示目标端点上不存在指定的方法。
return 如果消息端点需要事务性消息传送,则返回 true。
英文文档:

isDeliveryTransacted

boolean isDeliveryTransacted(Method method)
                             throws NoSuchMethodException
This is used to find out whether message deliveries to a target method on a message listener interface that is implemented by a message endpoint will be transacted or not. The message endpoint may indicate its transacted delivery preferences (at a per method level) through its deployment descriptor. The message delivery preferences must not change during the lifetime of a message endpoint.

Parameters:
method - description of a target method. This information about the intended target method allows an application server to find out whether the target method call will be transacted or not.
Returns:
true, if message endpoint requires transacted message delivery.
Throws:
NoSuchMethodException - indicates that the specified method does not exist on the target endpoint.


Submit a bug or feature

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

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

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