public class DefaultJmsTopicResolver extends Object implements JmsTopicResolver
instanceof operator to
detect JMS topics.| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger
logger used by this class
|
| Constructor and Description |
|---|
DefaultJmsTopicResolver(JmsConnector connector)
Create an instance of the resolver.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInvariants(javax.jms.Destination destination)
Perform some sanity checks, will complain in the log.
|
JmsConnector |
getConnector()
Getter for property 'connector'.
|
boolean |
isTopic(javax.jms.Destination destination)
Will use an
instanceof operator. |
boolean |
isTopic(org.mule.api.endpoint.ImmutableEndpoint endpoint)
Will use endpoint's resource info to detect a topic,
as in
jms://topic:trade.PriceUpdatesTopic. |
boolean |
isTopic(org.mule.api.endpoint.ImmutableEndpoint endpoint,
boolean fallbackToEndpointProperties)
Use endpoint configuration to detect a topic.
|
protected static final org.apache.commons.logging.Log logger
public DefaultJmsTopicResolver(JmsConnector connector)
connector - owning connectorpublic JmsConnector getConnector()
public boolean isTopic(org.mule.api.endpoint.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 JmsTopicResolverendpoint - endpoint to testisTopic(org.mule.api.endpoint.ImmutableEndpoint, boolean)public boolean isTopic(org.mule.api.endpoint.ImmutableEndpoint endpoint,
boolean fallbackToEndpointProperties)
false. In case resource info
returned true no endpoint properties would be consulted.isTopic in interface JmsTopicResolverendpoint - endpoint to testfallbackToEndpointProperties - whether to check endpoint's properties if
resource info returned falsepublic boolean isTopic(javax.jms.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 JmsTopicResolverdestination - a jms destination to testtrue if the destination is a topicprotected void checkInvariants(javax.jms.Destination destination)
destination - destination to testCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.