javax.jms

Interface Topic

  • All Superinterfaces:
    Destination
    All Known Subinterfaces:
    TemporaryTopic

    public interface Topic
    extends Destination
    A Topic object encapsulates a provider-specific topic name. It is the way a client specifies the identity of a topic to JMS API methods. For those methods that use a Destination as a parameter, a Topic object may used as an argument . For example, a Topic can be used to create a MessageConsumer and a MessageProducer by calling:
    • Session.CreateConsumer(Destination destination)
    • Session.CreateProducer(Destination destination)

    Many publish/subscribe (pub/sub) providers group topics into hierarchies and provide various options for subscribing to parts of the hierarchy. The JMS API places no restriction on what a Topic object represents. It may be a leaf in a topic hierarchy, or it may be a larger part of the hierarchy.

    The organization of topics and the granularity of subscriptions to them is an important part of a pub/sub application's architecture. The JMS API does not specify a policy for how this should be done. If an application takes advantage of a provider-specific topic-grouping mechanism, it should document this. If the application is installed using a different provider, it is the job of the administrator to construct an equivalent topic architecture and create equivalent Topic objects.

    Since:
    JMS 1.0
    Version:
    JMS 2.0
    See Also:
    Session.createConsumer(Destination), Session.createProducer(Destination), TopicSession.createTopic(String)
    • Method Detail

      • getTopicName

        String getTopicName()
                     throws JMSException
        Gets the name of this topic.

        Clients that depend upon the name are not portable.

        Returns:
        the topic name
        Throws:
        JMSException - if the JMS provider implementation of Topic fails to return the topic name due to some internal error.
      • toString

        String toString()
        Returns a string representation of this object.
        Overrides:
        toString in class Object
        Returns:
        the provider-specific identity values for this topic

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Version en cache

21/08/2025 20:53:46 Cette version de la page est en cache (à la date du 21/08/2025 20:53:46) afin d'accélérer le traitement.
Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.

Document créé le 14/04/2008, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/jms/topic.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, Topic

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.