Google

JBoss API: Interface ExternalContextMBean

org.jboss.naming
Interface ExternalContextMBean

All Superinterfaces:
Service, ServiceMBean
All Known Implementing Classes:
ExternalContext

public interface ExternalContextMBean
extends ServiceMBean

The ExternalContext mbean interface.

Version:
$Revision: 1.4 $
Author:
Scott_Stark@displayscape.com

Fields inherited from interface org.jboss.util.ServiceMBean
STARTED, STARTING, states, STOPPED, STOPPING
 
Method Summary
 boolean getCacheContext()
          Get the cacheContext flag.
 java.lang.String getInitialContext()
          Get the class name of the InitialContext implementation to use.
 java.lang.String getJndiName()
          Get the jndi name under which the external context is bound.
 boolean getRemoteAccess()
          Get the remote access flag.
 void setCacheContext(boolean flag)
          set the cacheContext flag.
 void setInitialContext(java.lang.String contextClass)
          Set the class name of the InitialContext implementation to use.
 void setJndiName(java.lang.String jndiName)
          Set the jndi name under which the external context is bound.
 void setProperties(java.lang.String contextPropsURL)
          Set the jndi.properties information for the external InitialContext.
 void setRemoteAccess(boolean remoteAccess)
          Set the remote access flag.
 
Methods inherited from interface org.jboss.util.ServiceMBean
getName, getState, getStateString
 
Methods inherited from interface org.jboss.util.Service
destroy, init, start, stop
 

Method Detail

getJndiName

public java.lang.String getJndiName()
Get the jndi name under which the external context is bound.

setJndiName

public void setJndiName(java.lang.String jndiName)
                 throws javax.naming.NamingException
Set the jndi name under which the external context is bound.

getRemoteAccess

public boolean getRemoteAccess()
Get the remote access flag. If true, the external context is bound using Serializable object that allows the InitialContext to be recreated remotely.

setRemoteAccess

public void setRemoteAccess(boolean remoteAccess)
Set the remote access flag. If true, the external context is bound using Serializable object that allows the InitialContext to be recreated remotely.

getCacheContext

public boolean getCacheContext()
Get the cacheContext flag.

setCacheContext

public void setCacheContext(boolean flag)
set the cacheContext flag. When set to true, the external Context is only created when the mbean is started and then stored as an in memory object until the mbean is stopped. If cacheContext if set to false, the external Context is created on each lookup using the mbean Properties and InitialContext class. When the uncached Context is looked up by a client, the client should invoke close() on the Context to prevent resource leaks.

getInitialContext

public java.lang.String getInitialContext()
Get the class name of the InitialContext implementation to use. Should be one of: javax.naming.InitialContext javax.naming.directory.InitialDirContext javax.naming.ldap.InitialLdapContext
Returns:
the classname of the InitialContext to use

setInitialContext

public void setInitialContext(java.lang.String contextClass)
                       throws java.lang.ClassNotFoundException
Set the class name of the InitialContext implementation to use. Should be one of: javax.naming.InitialContext javax.naming.directory.InitialDirContext javax.naming.ldap.InitialLdapContext The default is javax.naming.InitialContex.
Parameters:
contextClass, - the classname of the InitialContext to use

setProperties

public void setProperties(java.lang.String contextPropsURL)
                   throws java.io.IOException
Set the jndi.properties information for the external InitialContext. This is either a URL string or a classpath resource name. Examples: file:///config/myldap.properties http://config.mycompany.com/myldap.properties /conf/myldap.properties myldap.properties
Parameters:
contextPropsURL, - either a URL string to a jndi.properties type of content or a name of a resource to locate via the current thread context classpath.
Throws:
IOException, - thrown if the url/resource cannot be loaded.


Copyright © 2000 The JBoss Organization. All Rights Reserved.