com.sun.messaging

## Class Topic

- java.lang.Object
- - com.sun.messaging.AdministeredObject
  - - com.sun.messaging.Destination
    - - com.sun.messaging.BasicTopic
      - - com.sun.messaging.Topic

- All Implemented Interfaces:
    jakarta.jms.Destination, jakarta.jms.Topic, java.io.Serializable, javax.naming.Referenceable

      public class Topic
      extends BasicTopic
      implements javax.naming.Referenceable

  A `Topic` represents an identity of a repository of messages used in the JMS Publish/Subscribe messaging domain.
  See Also:
    `jakarta.jms.Topic`, Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.sun.messaging.AdministeredObject

      `AO_PROPERTY_TYPE_BOOLEAN, AO_PROPERTY_TYPE_INTEGER, AO_PROPERTY_TYPE_LIST, AO_PROPERTY_TYPE_LONG, AO_PROPERTY_TYPE_PROPERTYOWNER, AO_PROPERTY_TYPE_STRING, cachedConfigurationMap, configuration, configurationLabels, configurationTypes, cr, storedVersion, VERSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Topic()` Constructs an identity of a Publish/Subscribe Topic with the default name
    `Topic(java.lang.String name)` Constructs an identity of a Publish/Subscribe Topic with the given name

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getDescription()` Returns the description for this Topic.
    `javax.naming.Reference` | `getReference()` Returns a Reference Object that can be used to reconstruct this object.
    `void` | `setDescription(java.lang.String description)` Sets a description for this Topic.
    `void` | `setName(java.lang.String name)` Sets the name of this Topic.

    - ### Methods inherited from class com.sun.messaging.BasicTopic

      `equals, hashCode, isQueue, isTemporary`

    - ### Methods inherited from class com.sun.messaging.Destination

      `getName, getQueueName, getTopicName, setDefaultConfiguration, toString, validate_imqDestinationName`

    - ### Methods inherited from class com.sun.messaging.AdministeredObject

      `dump, enumeratePropertyNames, getConfiguration, getCurrentConfiguration, getLabelForGroup, getPropertiesForGroup, getProperty, getPropertyForListValue, getPropertyGroups, getPropertyLabel, getPropertyListOtherName, getPropertyListValues, getPropertyType, getPropertyValueForListValue, getStoredVersion, getVERSION, isPropertyDeprecated, isPropertyHidden, isReadOnly, isStoredVersionCompatible, setProperty, setReadOnly`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface jakarta.jms.Topic

      `getTopicName, toString`

- - ### Constructor Detail

    - #### Topic

          public Topic()

      Constructs an identity of a Publish/Subscribe Topic with the default name

    - #### Topic

          public Topic(java.lang.String name)
                throws jakarta.jms.JMSException

      Constructs an identity of a Publish/Subscribe Topic with the given name
      Parameters:
        `name` - The name of the Topic
      Throws:
        `jakarta.jms.JMSException`

  - ### Method Detail

    - #### getReference

          public javax.naming.Reference getReference()

      Returns a Reference Object that can be used to reconstruct this object.
      Specified by:
        `getReference` in interface `javax.naming.Referenceable`
      Returns:
        The Reference Object that can be used to reconstruct this object

    - #### setName

          public void setName(java.lang.String name)

      Sets the name of this Topic. This method performs name validatation This is used by an Application Server via the Sun MQ J2EE Resource Adapter
      Parameters:
        `name` - The name of the Topic
      Throws:
        `java.lang.IllegalArgumentException` - if name is invalid

    - #### setDescription

          public void setDescription(java.lang.String description)

      Sets a description for this Topic. The description can be any String
      Parameters:
        `description` - The description for this Topic

    - #### getDescription

          public java.lang.String getDescription()

      Returns the description for this Topic.
      Returns:
        The description for this Topic

Copyright (c) 2010, 2017 Oracle and/or its affiliates. All rights reserved.