Package com.webmethods.jms.impl
Class WmDestinationImpl
- java.lang.Object
-
- com.webmethods.jms.impl.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 Summary
Fields Modifier and Type Field Description protected java.lang.String
_clientGroup
protected boolean
_deadLetterOnly
protected java.lang.String
_eventType
protected boolean
_localOnly
protected java.lang.String
_name
protected boolean
_priorityOrdering
protected boolean
_sharedState
protected int
_sharedStateOrdering
protected boolean
_wildCard
protected static java.lang.String
DEAD_LETTER_ONLY_ATTRIBUTE
protected static java.lang.String
EVENT_TYPE_ATTRIBUTE
protected static java.lang.String
LOCAL_ONLY_ATTRIBUTE
protected static java.lang.String
NAME_ATTRIBUTE
protected static java.lang.String
PRIORITY_ORDERING_ATTRIBUTE
protected static java.lang.String
PROPERTIES_ATTRIBUTE
protected static java.lang.String
QUEUE_NAME_PROTOCOL
protected static java.lang.String
READ_ONLY_ATTRIBUTE
protected static java.lang.String
SHARED_STATE_ATTRIBUTE
protected static java.lang.String
SHARED_STATE_ORDERING_ATTRIBUTE
protected static java.lang.String
SHARED_STATE_ORDERING_STRING_NONE
protected static java.lang.String
SHARED_STATE_ORDERING_STRING_PUBLISHER
protected static java.lang.String
SHARED_STATE_ORDERING_STRING_SESSION
static java.lang.String
TEMP_QUEUE_NAME_PROTOCOL
static java.lang.String
TEMP_TOPIC_NAME_PROTOCOL
protected static java.lang.String
TOPIC_NAME_PROTOCOL
-
Fields inherited from interface com.webmethods.jms.WmDestination
SHARED_STATE_ORDERING_NONE, SHARED_STATE_ORDERING_PUBLISHER, SHARED_STATE_ORDERING_SESSION, WILDCARD
-
-
Constructor Summary
Constructors Constructor Description WmDestinationImpl()
WmDestinationImpl(java.lang.String name, java.util.HashMap<java.lang.String,java.lang.String> options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkSetName()
static WmDestination
createDestination(java.lang.String name)
boolean
equals(java.lang.Object obj)
static WmDestinationImpl
fromPropertyString(java.lang.String propString)
protected java.lang.String
getClientGroup()
boolean
getDeadLetterOnly()
Get whether dead letter subscriptions are enabled for this topic.java.lang.String
getEventType()
Get the event type name used for this destination.java.lang.String
getFullyQualifiedName()
boolean
getLocalOnly()
Get whether local only subscriptions are enabled for this topic.java.lang.String
getName()
Get the name of this destination.boolean
getPriorityOrdering()
Enable of disable priority ordering for this destination.boolean
getReadOnly()
Get wether this destination is read-only.javax.naming.Reference
getReference()
boolean
getSharedState()
Get the shared state for this destination.int
getSharedStateOrdering()
Get the shared state ordering for this destination.protected java.lang.String
getSharedStateOrderingString()
int
hashCode()
protected boolean
isDefault()
boolean
isWildCard()
Get whether the destination is wildcarded.protected java.lang.String
makePropertyString()
protected static WmDestination
readDestination(java.lang.String destinationString)
void
readExternal(java.io.ObjectInput in)
protected void
setAttribute(java.lang.String name, java.lang.Object value)
protected void
setAttributes(java.util.HashMap<java.lang.String,java.lang.String> options)
protected void
setClientGroup(java.lang.String clientGroup)
void
setDeadLetterOnly(boolean deadLetterOnly)
Enable dead letter subscriptions for this topic.void
setEventType(java.lang.String eventType)
Set the event type name used for this destination.void
setLocalOnly(boolean localOnly)
Enable local only subscriptions for this topic.void
setName(java.lang.String name)
Sets the name for the Destination.void
setPriorityOrdering(boolean priorityOrdering)
Enable of disable priority ordering for this destination.void
setReadOnly()
Set this destination to read-only.void
setSharedState(boolean sharedState)
Set the shared state for this destination.void
setSharedStateOrdering(int sharedStateOrdering)
Set the shared state ordering for this destination.java.lang.String
toString()
protected java.lang.String
writeDestination()
void
writeExternal(java.io.ObjectOutput out)
-
-
-
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
-
NAME_ATTRIBUTE
protected static final java.lang.String NAME_ATTRIBUTE
- 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
-
-
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
-
getName
public java.lang.String getName() throws javax.jms.JMSException
Description copied from interface:WmDestination
Get the name of this destination.- Specified by:
getName
in interfaceWmDestination
- Returns:
- the destination name
- Throws:
javax.jms.JMSException
- See Also:
WmDestination.setName(java.lang.String)
-
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 interfaceWmDestination
- Parameters:
name
- the Destination name.- Throws:
javax.jms.JMSException
- if unable to set the Destination's name.- See Also:
WmDestination.getName()
-
getEventType
public java.lang.String getEventType() throws javax.jms.JMSException
Get the event type name used for this destination.- Specified by:
getEventType
in interfaceWmDestination
- Returns:
- the event type name for this destination
- Throws:
javax.jms.JMSException
- See Also:
WmDestination.setEventType(java.lang.String)
-
getSharedState
public boolean getSharedState() throws javax.jms.JMSException
Get the shared state for this destination.- Specified by:
getSharedState
in interfaceWmDestination
- Returns:
- the shared state for this destination
- Throws:
javax.jms.JMSException
- See Also:
WmDestination.setSharedState(boolean)
-
getSharedStateOrdering
public int getSharedStateOrdering() throws javax.jms.JMSException
Get the shared state ordering for this destination.- Specified by:
getSharedStateOrdering
in interfaceWmDestination
- Returns:
- the shared state ordering for this destination
- Throws:
javax.jms.JMSException
- See Also:
WmDestination.setSharedStateOrdering(int)
-
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 interfaceWmDestination
- 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 interfaceWmDestination
- Parameters:
sharedState
- the shared state value for this destination- Throws:
javax.jms.JMSException
- if unable to set the shared state- See Also:
WmDestination.getSharedState()
-
setSharedStateOrdering
public void setSharedStateOrdering(int sharedStateOrdering) throws javax.jms.JMSException
Set the shared state ordering for this destination.- Specified by:
setSharedStateOrdering
in interfaceWmDestination
- Parameters:
sharedStateOrdering
- the shared state ordering valud for this destination; eitherWmDestination.SHARED_STATE_ORDERING_NONE
orWmDestination.SHARED_STATE_ORDERING_PUBLISHER
- Throws:
javax.jms.JMSException
- if unable to set the shared state ordering- See Also:
WmDestination.getSharedStateOrdering()
-
isWildCard
public boolean isWildCard() throws javax.jms.JMSException
Get whether the destination is wildcarded.- Specified by:
isWildCard
in interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfaceWmDestination
- 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 interfacejavax.naming.Referenceable
- Throws:
javax.naming.NamingException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.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 interfacejava.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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getSharedStateOrderingString
protected java.lang.String getSharedStateOrderingString()
-
checkSetName
protected void checkSetName() throws javax.jms.InvalidDestinationException
- Throws:
javax.jms.InvalidDestinationException
-
-