public class DefaultJmsTopicResolver extends Object implements JmsTopicResolver
instanceof
operator to
detect JMS topics.Modifier and Type | Field and Description |
---|---|
protected static 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(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.
|
protected static final Log logger
public DefaultJmsTopicResolver(JmsConnector connector)
connector
- owning connectorpublic 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 testisTopic(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 falsepublic 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 testtrue
if the destination is a topicprotected void checkInvariants(Destination destination)
destination
- destination to testCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.