|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.jndi.JNDIBaseStorable
org.codehaus.activemq.message.ActiveMQDestination
A Destination
object encapsulates a provider-specific
address.
The JMS API does not define a standard address syntax. Although a standard
address syntax was considered, it was decided that the differences in
address semantics between existing message-oriented middleware (MOM)
products were too wide to bridge with a single syntax.
Since Destination
is an administered object, it may
contain
provider-specific configuration information in addition to its address.
The JMS API also supports a client's use of provider-specific address names.
Destination
objects support concurrent use.
A Destination
object is a JMS administered object.
JMS administered objects are objects containing configuration information that are created by an administrator and later used by JMS clients. They make it practical to administer the JMS API in the enterprise.
Although the interfaces for administered objects do not explicitly depend on the Java Naming and Directory Interface (JNDI) API, the JMS API establishes the convention that JMS clients find administered objects by looking them up in a JNDI namespace.
An administrator can place an administered object anywhere in a namespace. The JMS API does not define a naming policy.
It is expected that JMS providers will provide the tools an
administrator needs to create and configure administered objects in a
JNDI namespace. JMS provider implementations of administered objects
should implement the javax.naming.Referenceable
and
java.io.Serializable
interfaces so that they can be stored in
all JNDI naming contexts. In addition, it is recommended that these
implementations follow the JavaBeansTM
design patterns.
This strategy provides several benefits:
An administered object should not hold on to any remote resources. Its lookup should not use remote resources other than those used by the JNDI API itself.
Clients should think of administered objects as local Java objects. Looking them up should not have any hidden side effects or use surprising amounts of local resources.
Field Summary | |
static int |
ACTIVEMQ_QUEUE
Queue Destination object |
static int |
ACTIVEMQ_TEMPORARY_QUEUE
Temporary Queue Destination object |
static int |
ACTIVEMQ_TEMPORARY_TOPIC
Temporary Topic Destination object |
static int |
ACTIVEMQ_TOPIC
Topic Destination object |
Constructor Summary | |
protected |
ActiveMQDestination()
The Default Constructor |
protected |
ActiveMQDestination(String name)
Construct the ActiveMQDestination with a defined physical name; |
Method Summary | |
protected void |
buildFromProperties(Properties props)
Set the properties that will represent the instance in JNDI |
int |
compareTo(ActiveMQDestination that)
Lets sort by name first then lets sort topics greater than queues |
int |
compareTo(Object o)
|
protected abstract Destination |
createDestination(String name)
Factory method to create a child destination if this destination is a composite |
protected abstract JMSDestinationStats |
createDestinationStats()
Factory method to create a statistics counter object |
static String |
createTemporaryName(String clientId)
Create a temporary name from the clientId |
boolean |
equals(Object obj)
if the object passed in is equivalent, return true |
List |
getChildDestinations()
Returns a list of child destinations if this destination represents a composite destination. |
static String |
getClientId(ActiveMQDestination destination)
From a temporary destination find the clientId of the Connection that created it |
DestinationFilter |
getDestinationFilter()
|
String[] |
getDestinationPaths()
|
abstract int |
getDestinationType()
|
String |
getPhysicalName()
|
JMSDestinationStats |
getStats()
|
int |
hashCode()
|
static String |
inspect(Destination destination)
A helper method to return a descriptive string for the topic or queue |
boolean |
isComposite()
Returns true if this destination represents a collection of destinations; allowing a set of destinations to be published to or subscribed from in one JMS operation. |
boolean |
isQueue()
Returns true if a Queue Destination |
boolean |
isTemporary()
Returns true if a temporary Destination |
boolean |
isTopic()
Returns true if a Topic Destination |
boolean |
isWildcard()
|
boolean |
matches(ActiveMQDestination destination)
Returns true if the given destination matches this destination; including wildcards |
protected void |
populateProperties(Properties props)
Initialize the instance from properties stored in JNDI |
static ActiveMQDestination |
readFromStream(DataInput dataIn)
Read an ActiveMQDestination from a Stream |
void |
setPhysicalName(String newPhysicalName)
|
void |
setStats(JMSDestinationStats stats)
|
String |
toString()
|
static ActiveMQDestination |
transformDestination(Destination destination)
|
static void |
writeToStream(ActiveMQDestination destination,
DataOutput dataOut)
Write an ActiveMQDestination to a Stream |
Methods inherited from class org.codehaus.activemq.jndi.JNDIBaseStorable |
getProperties, getReference, setProperties |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ACTIVEMQ_TOPIC
public static final int ACTIVEMQ_TEMPORARY_TOPIC
public static final int ACTIVEMQ_QUEUE
public static final int ACTIVEMQ_TEMPORARY_QUEUE
Constructor Detail |
protected ActiveMQDestination()
protected ActiveMQDestination(String name)
name
- Method Detail |
public static String inspect(Destination destination)
public static ActiveMQDestination transformDestination(Destination destination) throws JMSException
destination
-
JMSException
public static void writeToStream(ActiveMQDestination destination, DataOutput dataOut) throws IOException
destination
- dataOut
-
IOException
public static ActiveMQDestination readFromStream(DataInput dataIn) throws IOException
dataIn
-
IOException
public static String createTemporaryName(String clientId)
clientId
-
public static String getClientId(ActiveMQDestination destination)
destination
-
public int compareTo(Object o)
compareTo
in interface Comparable
o
- object to compare
public int compareTo(ActiveMQDestination that)
that
- another destination to compare against
public abstract int getDestinationType()
public String getPhysicalName()
public void setPhysicalName(String newPhysicalName)
newPhysicalName
- The physicalName to set.public boolean isTemporary()
public boolean isTopic()
public boolean isQueue()
public boolean isComposite()
getChildDestinations()
to return the list of child destinations.
public List getChildDestinations()
public String toString()
public int hashCode()
public boolean equals(Object obj)
obj
- the object to compare
public boolean isWildcard()
public boolean matches(ActiveMQDestination destination)
public DestinationFilter getDestinationFilter()
public String[] getDestinationPaths()
public JMSDestinationStats getStats()
public void setStats(JMSDestinationStats stats)
protected abstract Destination createDestination(String name)
protected abstract JMSDestinationStats createDestinationStats()
protected void buildFromProperties(Properties props)
buildFromProperties
in class JNDIBaseStorable
props
- protected void populateProperties(Properties props)
populateProperties
in class JNDIBaseStorable
props
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |