org.ikasan.framework.messaging.jms
Class DefaultJndiDestinationFactory

java.lang.Object
  extended by org.ikasan.framework.messaging.jms.DefaultJndiDestinationFactory
All Implemented Interfaces:
JndiDestinationFactory

public class DefaultJndiDestinationFactory
extends Object
implements JndiDestinationFactory

Default implementation of JndiDestinationFactory Attempts to provide the Destination implied through configuration. Allows lookup to return cached instance if exists, and may also attempt an initial lookup on start

Author:
Ikasan Development Team

Constructor Summary
DefaultJndiDestinationFactory(String jndiName, Map<String,String> environment)
          Constructor
DefaultJndiDestinationFactory(String jndiName, Map<String,String> environment, boolean lookupOnCreation)
          Constructor
 
Method Summary
 javax.jms.Destination getDestination(boolean allowCachedResult)
          Retrieves the configured Destination if possible
 Map<?,?> getEnvironment()
          Accessor for environment
 String getJndiName()
          Accessor for jndiName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJndiDestinationFactory

public DefaultJndiDestinationFactory(String jndiName,
                                     Map<String,String> environment)
Constructor

Parameters:
jndiName - - jndiName of the desired Destination
environment - - environment parameters for creating the InitialContext

DefaultJndiDestinationFactory

public DefaultJndiDestinationFactory(String jndiName,
                                     Map<String,String> environment,
                                     boolean lookupOnCreation)
Constructor

Parameters:
jndiName - - jndiName of the desired Destination
environment - - environment parameters for creating the InitialContext
Method Detail

getDestination

public javax.jms.Destination getDestination(boolean allowCachedResult)
                                     throws NamingException
Description copied from interface: JndiDestinationFactory
Retrieves the configured Destination if possible

Specified by:
getDestination in interface JndiDestinationFactory
Parameters:
allowCachedResult - - allows the implementation to return a previous result if one exists
Returns:
Destination specified by configured jndiName and server
Throws:
NamingException

getEnvironment

public Map<?,?> getEnvironment()
Accessor for environment

Specified by:
getEnvironment in interface JndiDestinationFactory
Returns:
environment

getJndiName

public String getJndiName()
Accessor for jndiName

Specified by:
getJndiName in interface JndiDestinationFactory
Returns:
jndiName


Copyright © 2007-2012 Ikasan. All Rights Reserved.