org.mule.transport.jms.jndi
Class AbstractJndiNameResolver

java.lang.Object
  extended by org.mule.transport.jms.jndi.AbstractJndiNameResolver
All Implemented Interfaces:
Disposable, Initialisable, Lifecycle, Startable, Stoppable, JndiNameResolver
Direct Known Subclasses:
CachedJndiNameResolver, SimpleJndiNameResolver

public abstract class AbstractJndiNameResolver
extends Object
implements JndiNameResolver


Field Summary
protected  Log logger
           
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
AbstractJndiNameResolver()
           
 
Method Summary
protected  Context createInitialContext()
          Creates a JNDI context using the current contextFactory
 void dispose()
          A lifecycle method where implementor should free up any resources.
 InitialContextFactory getContextFactory()
           
protected  Hashtable getContextProperties()
           
 String getJndiInitialFactory()
           
 Map getJndiProviderProperties()
           
 String getJndiProviderUrl()
           
 void initialise()
          Method used to perform any initialisation work.
 void setContextFactory(InitialContextFactory contextFactory)
           
 void setJndiInitialFactory(String jndiInitialFactory)
           
 void setJndiProviderProperties(Map jndiProviderProperties)
           
 void setJndiProviderUrl(String jndiProviderUrl)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.transport.jms.jndi.JndiNameResolver
lookup
 

Field Detail

logger

protected final Log logger
Constructor Detail

AbstractJndiNameResolver

public AbstractJndiNameResolver()
Method Detail

createInitialContext

protected Context createInitialContext()
                                throws NamingException
Creates a JNDI context using the current contextFactory

Returns:
a new Context instance. Callers must provide concurrent access control on the returned value.
Throws:
NamingException - if there is a problem during the context creation.

getContextProperties

protected Hashtable getContextProperties()

getJndiProviderUrl

public String getJndiProviderUrl()

setJndiProviderUrl

public void setJndiProviderUrl(String jndiProviderUrl)

getJndiInitialFactory

public String getJndiInitialFactory()

setJndiInitialFactory

public void setJndiInitialFactory(String jndiInitialFactory)

getJndiProviderProperties

public Map getJndiProviderProperties()

setJndiProviderProperties

public void setJndiProviderProperties(Map jndiProviderProperties)

getContextFactory

public InitialContextFactory getContextFactory()

setContextFactory

public void setContextFactory(InitialContextFactory contextFactory)

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

start

public void start()
           throws MuleException
Specified by:
start in interface Startable
Throws:
MuleException

stop

public void stop()
          throws MuleException
Specified by:
stop in interface Stoppable
Throws:
MuleException


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.