org.mule.providers.jms
Class DefaultJmsTopicResolver

java.lang.Object
  extended byorg.mule.providers.jms.DefaultJmsTopicResolver
All Implemented Interfaces:
JmsTopicResolver
Direct Known Subclasses:
WeblogicJmsTopicResolver

public class DefaultJmsTopicResolver
extends Object
implements JmsTopicResolver

A default implementation of the resolver uses endpoint's resource info and Java's 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 operator.
 boolean isTopic(UMOImmutableEndpoint endpoint)
          Will use endpoint's resource info to detect a topic, as in .
 boolean isTopic(UMOImmutableEndpoint endpoint, boolean fallbackToEndpointProperties)
          Use endpoint configuration to detect a topic. Additionally, specify a fallback mechanism to search in endpoint's properties in case resource info yields . In case resource info returned no endpoint properties would be consulted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final Log logger
logger used by this class

Constructor Detail

DefaultJmsTopicResolver

public DefaultJmsTopicResolver(JmsConnector connector)
Create an instance of the resolver.

Parameters:
connector - owning connector
Method Detail

getConnector

public JmsConnector getConnector()
Getter for property 'connector'.

Returns:
Value for property 'connector'.

isTopic

public boolean isTopic(UMOImmutableEndpoint endpoint)
Will use endpoint's resource info to detect a topic, as in . This method will call isTopic(org.mule.umo.endpoint.UMOImmutableEndpoint, boolean) with fallback flag set to false.

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.

Specified by:
isTopic in interface JmsTopicResolver
Parameters:
endpoint - endpoint to test
Returns:
true if the endpoint has a topic configuration
See Also:
isTopic(org.mule.umo.endpoint.UMOImmutableEndpoint, boolean)

isTopic

public boolean isTopic(UMOImmutableEndpoint endpoint,
                       boolean fallbackToEndpointProperties)
Use endpoint configuration to detect a topic. Additionally, specify a fallback mechanism to search in endpoint's properties in case resource info yields . In case resource info returned no endpoint properties would be consulted.

Specified by:
isTopic in interface JmsTopicResolver
Parameters:
endpoint - endpoint to test
fallbackToEndpointProperties - whether to check endpoint's properties if resource info returned false
Returns:
true if endpoint's config tells it's a topic

isTopic

public boolean isTopic(Destination destination)
Will use an operator. Keep in mind that may fail for JMS systems implementing both a and in a single destination class implementation.

Specified by:
isTopic in interface JmsTopicResolver
Parameters:
destination - a jms destination to test
Returns:
if the destination is a topic

checkInvariants

protected void checkInvariants(Destination destination)
Perform some sanity checks, will complain in the log.

Parameters:
destination - destination to test


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.