Class WmDestinationImpl

  • All Implemented Interfaces:
    WmDestination, java.io.Externalizable, java.io.Serializable, javax.jms.Destination, javax.naming.Referenceable
    Direct Known Subclasses:
    WmQueueImpl, WmTopicImpl

    public abstract class WmDestinationImpl
    extends java.lang.Object
    implements WmDestination, javax.naming.Referenceable, java.io.Externalizable
    See Also:
    Serialized Form
    • Field Detail

      • QUEUE_NAME_PROTOCOL

        protected static final java.lang.String QUEUE_NAME_PROTOCOL
        See Also:
        Constant Field Values
      • TOPIC_NAME_PROTOCOL

        protected static final java.lang.String TOPIC_NAME_PROTOCOL
        See Also:
        Constant Field Values
      • TEMP_QUEUE_NAME_PROTOCOL

        public static final java.lang.String TEMP_QUEUE_NAME_PROTOCOL
        See Also:
        Constant Field Values
      • TEMP_TOPIC_NAME_PROTOCOL

        public static final java.lang.String TEMP_TOPIC_NAME_PROTOCOL
        See Also:
        Constant Field Values
      • EVENT_TYPE_ATTRIBUTE

        protected static final java.lang.String EVENT_TYPE_ATTRIBUTE
        See Also:
        Constant Field Values
      • SHARED_STATE_ATTRIBUTE

        protected static final java.lang.String SHARED_STATE_ATTRIBUTE
        See Also:
        Constant Field Values
      • SHARED_STATE_ORDERING_ATTRIBUTE

        protected static final java.lang.String SHARED_STATE_ORDERING_ATTRIBUTE
        See Also:
        Constant Field Values
      • DEAD_LETTER_ONLY_ATTRIBUTE

        protected static final java.lang.String DEAD_LETTER_ONLY_ATTRIBUTE
        See Also:
        Constant Field Values
      • LOCAL_ONLY_ATTRIBUTE

        protected static final java.lang.String LOCAL_ONLY_ATTRIBUTE
        See Also:
        Constant Field Values
      • PRIORITY_ORDERING_ATTRIBUTE

        protected static final java.lang.String PRIORITY_ORDERING_ATTRIBUTE
        See Also:
        Constant Field Values
      • PROPERTIES_ATTRIBUTE

        protected static final java.lang.String PROPERTIES_ATTRIBUTE
        See Also:
        Constant Field Values
      • READ_ONLY_ATTRIBUTE

        protected static final java.lang.String READ_ONLY_ATTRIBUTE
        See Also:
        Constant Field Values
      • SHARED_STATE_ORDERING_STRING_NONE

        protected static final java.lang.String SHARED_STATE_ORDERING_STRING_NONE
        See Also:
        Constant Field Values
      • SHARED_STATE_ORDERING_STRING_PUBLISHER

        protected static final java.lang.String SHARED_STATE_ORDERING_STRING_PUBLISHER
        See Also:
        Constant Field Values
      • SHARED_STATE_ORDERING_STRING_SESSION

        protected static final java.lang.String SHARED_STATE_ORDERING_STRING_SESSION
        See Also:
        Constant Field Values
      • _name

        protected java.lang.String _name
      • _eventType

        protected java.lang.String _eventType
      • _wildCard

        protected boolean _wildCard
      • _sharedState

        protected boolean _sharedState
      • _sharedStateOrdering

        protected int _sharedStateOrdering
      • _deadLetterOnly

        protected boolean _deadLetterOnly
      • _localOnly

        protected boolean _localOnly
      • _priorityOrdering

        protected boolean _priorityOrdering
      • _clientGroup

        protected java.lang.String _clientGroup
    • Constructor Detail

      • WmDestinationImpl

        public WmDestinationImpl()
      • WmDestinationImpl

        public WmDestinationImpl​(java.lang.String name,
                                 java.util.HashMap<java.lang.String,​java.lang.String> options)
                          throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
    • Method Detail

      • createDestination

        public static WmDestination createDestination​(java.lang.String name)
                                               throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • getFullyQualifiedName

        public java.lang.String getFullyQualifiedName()
                                               throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • writeDestination

        protected java.lang.String writeDestination()
                                             throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • readDestination

        protected static WmDestination readDestination​(java.lang.String destinationString)
                                                throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
      • setName

        public void setName​(java.lang.String name)
                     throws javax.jms.JMSException
        Sets the name for the Destination.

        The Destination name must be a valid name. All Destinations must have a name.

        Specified by:
        setName in interface WmDestination
        Parameters:
        name - the Destination name.
        Throws:
        javax.jms.JMSException - if unable to set the Destination's name.
        See Also:
        WmDestination.getName()
      • setEventType

        public void setEventType​(java.lang.String eventType)
                          throws javax.jms.JMSException
        Set the event type name used for this destination.
        Specified by:
        setEventType in interface WmDestination
        Parameters:
        eventType - the event type name for this destination
        Throws:
        javax.jms.JMSException - if unable to set the event type
        See Also:
        WmDestination.getEventType()
      • setSharedState

        public void setSharedState​(boolean sharedState)
                            throws javax.jms.JMSException
        Set the shared state for this destination.
        Specified by:
        setSharedState in interface WmDestination
        Parameters:
        sharedState - the shared state value for this destination
        Throws:
        javax.jms.JMSException - if unable to set the shared state
        See Also:
        WmDestination.getSharedState()
      • isWildCard

        public boolean isWildCard()
                           throws javax.jms.JMSException
        Get whether the destination is wildcarded.
        Specified by:
        isWildCard in interface WmDestination
        Returns:
        true if the destination is wildcarded; false otherwise
        Throws:
        javax.jms.JMSException
      • setDeadLetterOnly

        public void setDeadLetterOnly​(boolean deadLetterOnly)
                               throws javax.jms.JMSException
        Enable dead letter subscriptions for this topic. When enabled subscribers to this topic will only receive messages if they are undeliverable.
        Specified by:
        setDeadLetterOnly in interface WmDestination
        Parameters:
        deadLetterOnly - true to enable dead letter subscriptions
        Throws:
        javax.jms.JMSException - if unable to set dead letter subscriptions
        See Also:
        WmDestination.getDeadLetterOnly()
      • getDeadLetterOnly

        public boolean getDeadLetterOnly()
                                  throws javax.jms.JMSException
        Get whether dead letter subscriptions are enabled for this topic.
        Specified by:
        getDeadLetterOnly in interface WmDestination
        Returns:
        whether dead letter subscriptions are enabled
        Throws:
        javax.jms.JMSException
        See Also:
        WmDestination.setDeadLetterOnly(boolean)
      • setLocalOnly

        public void setLocalOnly​(boolean localOnly)
                          throws javax.jms.JMSException
        Enable local only subscriptions for this topic. When enabled subscribers to this topic will only receive messages published by publishers connected to the same JMS Broker as the subscriber.
        Specified by:
        setLocalOnly in interface WmDestination
        Parameters:
        localOnly - true to enable local only subscriptions
        Throws:
        javax.jms.JMSException - if unable to set local only subscriptions
        See Also:
        WmDestination.getLocalOnly()
      • getLocalOnly

        public boolean getLocalOnly()
                             throws javax.jms.JMSException
        Get whether local only subscriptions are enabled for this topic.
        Specified by:
        getLocalOnly in interface WmDestination
        Returns:
        whether dead letter subscriptions are enabled
        Throws:
        javax.jms.JMSException
        See Also:
        WmDestination.setLocalOnly(boolean)
      • setPriorityOrdering

        public void setPriorityOrdering​(boolean priorityOrdering)
                                 throws javax.jms.JMSException
        Enable of disable priority ordering for this destination. If enabled messages will be received in priority order. If disabled messages will be received in publisher order.

        The default is for priority ordering to be enabled.

        Specified by:
        setPriorityOrdering in interface WmDestination
        Parameters:
        priorityOrdering - true to enable priority ordering
        Throws:
        javax.jms.JMSException - if unable to set priority ordering
        See Also:
        WmDestination.getPriorityOrdering()
      • getPriorityOrdering

        public boolean getPriorityOrdering()
                                    throws javax.jms.JMSException
        Enable of disable priority ordering for this destination. If enabled messages will be received in priority order. If disabled messages will be received in publisher order.

        The default is for priority ordering to be enabled.

        Specified by:
        getPriorityOrdering in interface WmDestination
        Returns:
        whether priority ordering is enabled
        Throws:
        javax.jms.JMSException
        See Also:
        WmDestination.setPriorityOrdering(boolean)
      • setReadOnly

        public void setReadOnly()
                         throws javax.jms.JMSException
        Set this destination to read-only. Once set to read-only none of the destination's attributes can be modified.
        Specified by:
        setReadOnly in interface WmDestination
        Throws:
        javax.jms.JMSException - if unable to set the destination to read-only
        See Also:
        getReadOnly()
      • getReadOnly

        public boolean getReadOnly()
                            throws javax.jms.JMSException
        Get wether this destination is read-only.
        Specified by:
        getReadOnly in interface WmDestination
        Returns:
        whether this destination is read-only
        Throws:
        javax.jms.JMSException - if unable to get the destination's read-only attribute
      • getReference

        public javax.naming.Reference getReference()
                                            throws javax.naming.NamingException
        Specified by:
        getReference in interface javax.naming.Referenceable
        Throws:
        javax.naming.NamingException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • makePropertyString

        protected java.lang.String makePropertyString()
      • fromPropertyString

        public static WmDestinationImpl fromPropertyString​(java.lang.String propString)
      • isDefault

        protected boolean isDefault()
      • setClientGroup

        protected void setClientGroup​(java.lang.String clientGroup)
      • getClientGroup

        protected java.lang.String getClientGroup()
      • setAttributes

        protected void setAttributes​(java.util.HashMap<java.lang.String,​java.lang.String> options)
      • setAttribute

        protected void setAttribute​(java.lang.String name,
                                    java.lang.Object value)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getSharedStateOrderingString

        protected java.lang.String getSharedStateOrderingString()
      • checkSetName

        protected void checkSetName()
                             throws javax.jms.InvalidDestinationException
        Throws:
        javax.jms.InvalidDestinationException