-
public interface MessageEndpointFactory
This serves as a factory for creating message endpoints.- Since:
- 1.5
- Version:
- 1.7
- Author:
- Ram Jeyaraman, Sivakumar Thyagarajan
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description MessageEndpoint
createEndpoint(XAResource xaResource)
This is used to create a message endpoint.MessageEndpoint
createEndpoint(XAResource xaResource, long timeout)
This is used to create a message endpoint.String
getActivationName()
Returns a unique name for the message endpoint deployment represented by theMessageEndpointFactory
.Class<?>
getEndpointClass()
Return theClass
object corresponding to the message endpoint class.boolean
isDeliveryTransacted(Method method)
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 or a target method in theClass
returned by thegetBeanClass
method, will be transacted or not.
-
-
-
Method Detail
-
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 optionalXAResource
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.
-
createEndpoint
MessageEndpoint createEndpoint(XAResource xaResource, long timeout) 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 optionalXAResource
instance used to get transaction notifications when the message delivery is transacted.timeout
- an optional value used to specify the time duration (in milliseconds) within which the message endpoint needs to be created by theMessageEndpointFactory
. Otherwise, theMessageEndpointFactory
rejects the creation of theMessageEndpoint
with an UnavailableException. Note, this does not offer real-time guarantees.- 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.- Since:
- 1.6
-
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 or a target method in theClass
returned by thegetBeanClass
method, 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.
-
getActivationName
String getActivationName()
Returns a unique name for the message endpoint deployment represented by theMessageEndpointFactory
. If the message endpoint has been deployed into a clustered application server then this method must return the same name for that message endpoint’s activation in each application server instance. It is recommended that this name be human-readable since this name may be used by the resource adapter in ways that may be visible to a user or administrator. It is also recommended that this name remain unchanged even in cases when the application server is restarted or the message endpoint redeployed.- Returns:
- a new
String
instance representing the unique name of the message endpoint deployment - Since:
- 1.7
-
getEndpointClass
Class<?> getEndpointClass()
Return theClass
object corresponding to the message endpoint class. For example, for a Message Driven Bean this is theClass
object corresponding to the application's MDB class. The resource adapter may use this to introspect the message endpoint class to discover annotations, interfaces implemented, etc. and modify the behavior of the resource adapter accordingly. A return value ofnull
indicates that theMessageEndpoint
doesn't implement the business methods of underlying message endpoint class.- Returns:
- A
Class
corresponding to the message endpoint class. - Since:
- 1.7
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/resource/spi/endpoint/MessageEndpointFactory.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.