|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mule.transport.jms.DefaultJmsTopicResolver
public class DefaultJmsTopicResolver
A default implementation of the resolver uses endpoint's
resource info and Java's instanceof
operator to
detect JMS topics.
Field Summary | |
---|---|
protected static Log |
logger
logger used by this class |
Constructor Summary | |
---|---|
DefaultJmsTopicResolver(JmsConnector connector)
Create an instance of the resolver. |
Method Summary | |
---|---|
protected void |
checkInvariants(Destination destination)
Perform some sanity checks, will complain in the log. |
JmsConnector |
getConnector()
Getter for property 'connector'. |
boolean |
isTopic(Destination destination)
Will use an instanceof operator. |
boolean |
isTopic(ImmutableEndpoint endpoint)
Will use endpoint's resource info to detect a topic, as in jms://topic:trade.PriceUpdatesTopic . |
boolean |
isTopic(ImmutableEndpoint endpoint,
boolean fallbackToEndpointProperties)
Use endpoint configuration to detect a topic. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log logger
Constructor Detail |
---|
public DefaultJmsTopicResolver(JmsConnector connector)
connector
- owning connectorMethod Detail |
---|
public JmsConnector getConnector()
public boolean isTopic(ImmutableEndpoint endpoint)
jms://topic:trade.PriceUpdatesTopic
. This
method will call isTopic(org.mule.api.endpoint.ImmutableEndpoint, boolean)
with fallback flag set to true.
NOTE: When using topics, use the '.' (dot) symbol for subcontext separation,
as opposed to '/'. Otherwise the resource info may not get properly translated for the
topic endpoint due to the way URI's are parsed.
isTopic
in interface JmsTopicResolver
endpoint
- endpoint to test
isTopic(org.mule.api.endpoint.ImmutableEndpoint, boolean)
public boolean isTopic(ImmutableEndpoint endpoint, boolean fallbackToEndpointProperties)
false
. In case resource info
returned true
no endpoint properties would be consulted.
isTopic
in interface JmsTopicResolver
endpoint
- endpoint to testfallbackToEndpointProperties
- whether to check endpoint's properties if
resource info returned false
public boolean isTopic(Destination destination)
instanceof
operator. Keep in mind
that may fail for JMS systems implementing both a
javax.jms.Topic
and javax.jms.Queue
in
a single destination class implementation.
isTopic
in interface JmsTopicResolver
destination
- a jms destination to test
true
if the destination is a topicprotected void checkInvariants(Destination destination)
destination
- destination to test
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |