FileDocCategorySizeDatePackage
DefaultContext.javaAPI DocGlassfish v2 API16932Fri May 04 22:31:52 BST 2007org.apache.catalina

DefaultContext

public interface DefaultContext
Used to store the default configuration a Host will use when creating a Context. A Context configured in server.xml can override these defaults by setting the Context attribute override="true".
author
Glenn Nielsen
author
Remy Maucherat
version
$Revision: 1.3 $ $Date: 2007/05/05 05:31:51 $

Fields Summary
Constructors Summary
Methods Summary
public voidaddApplicationListener(java.lang.String listener)
Add a new Listener class name to the set of Listeners configured for this application.

param
listener Java class name of a listener class

public voidaddApplicationParameter(org.apache.catalina.deploy.ApplicationParameter parameter)
Add a new application parameter for this application.

param
parameter The new application parameter

public voidaddEjb(org.apache.catalina.deploy.ContextEjb ejb)
Add an EJB resource reference for this web application.

param
ejb New EJB resource reference

public voidaddEnvironment(org.apache.catalina.deploy.ContextEnvironment environment)
Add an environment entry for this web application.

param
environment New environment entry

public voidaddInstanceListener(java.lang.String listener)
Add the classname of an InstanceListener to be added to each Wrapper appended to this Context.

param
listener Java class name of an InstanceListener class

public voidaddParameter(java.lang.String name, java.lang.String value)
Add a new context initialization parameter, replacing any existing value for the specified name.

param
name Name of the new parameter
param
value Value of the new parameter
exception
IllegalArgumentException if the name or value is missing, or if this context initialization parameter has already been registered

public voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component.

param
listener The listener to add

public voidaddResource(org.apache.catalina.deploy.ContextResource resource)
Add a resource reference for this web application.

param
resource New resource reference

public voidaddResourceEnvRef(java.lang.String name, java.lang.String type)
Add a resource environment reference for this web application.

param
name The resource environment reference name
param
type The resource environment reference type

public voidaddResourceLink(org.apache.catalina.deploy.ContextResourceLink resourceLink)
Add a resource link for this web application.

param
resource New resource link

public voidaddResourceParams(org.apache.catalina.deploy.ResourceParams resourceParameters)
Add resource parameters for this web application.

param
resourceParameters New resource parameters

public voidaddWrapperLifecycle(java.lang.String listener)
Add the classname of a LifecycleListener to be added to each Wrapper appended to this Context.

param
listener Java class name of a LifecycleListener class

public voidaddWrapperListener(java.lang.String listener)
Add the classname of a ContainerListener to be added to each Wrapper appended to this Context.

param
listener Java class name of a ContainerListener class

public java.lang.String[]findApplicationListeners()
Return the set of application listener class names configured for this application.

public org.apache.catalina.deploy.ApplicationParameter[]findApplicationParameters()
Return the set of application parameters for this application.

public org.apache.catalina.deploy.ContextEjbfindEjb(java.lang.String name)
Return the EJB resource reference with the specified name, if any; otherwise, return null.

param
name Name of the desired EJB resource reference

public org.apache.catalina.deploy.ContextEjb[]findEjbs()
Return the defined EJB resource references for this application. If there are none, a zero-length array is returned.

public org.apache.catalina.deploy.ContextEnvironmentfindEnvironment(java.lang.String name)
Return the environment entry with the specified name, if any; otherwise, return null.

param
name Name of the desired environment entry

public org.apache.catalina.deploy.ContextEnvironment[]findEnvironments()
Return the set of defined environment entries for this web application. If none have been defined, a zero-length array is returned.

public java.lang.String[]findInstanceListeners()
Return the set of InstanceListener classes that will be added to newly created Wrappers automatically.

public java.lang.StringfindParameter(java.lang.String name)
Return the value for the specified context initialization parameter name, if any; otherwise return null.

param
name Name of the parameter to return

public java.lang.String[]findParameters()
Return the names of all defined context initialization parameters for this Context. If no parameters are defined, a zero-length array is returned.

public org.apache.catalina.deploy.ContextResourcefindResource(java.lang.String name)
Return the resource reference with the specified name, if any; otherwise return null.

param
name Name of the desired resource reference

public java.lang.StringfindResourceEnvRef(java.lang.String name)
Return the resource environment reference type for the specified name, if any; otherwise return null.

param
name Name of the desired resource environment reference

public java.lang.String[]findResourceEnvRefs()
Return the set of resource environment reference names for this web application. If none have been specified, a zero-length array is returned.

public org.apache.catalina.deploy.ContextResourceLinkfindResourceLink(java.lang.String name)
Return the resource link with the specified name, if any; otherwise return null.

param
name Name of the desired resource link

public org.apache.catalina.deploy.ContextResourceLink[]findResourceLinks()
Return the defined resource links for this application. If none have been defined, a zero-length array is returned.

public org.apache.catalina.deploy.ResourceParams[]findResourceParams()
Return the set of defined resource parameters for this web application. If none have been defined, a zero-length array is returned.

public org.apache.catalina.deploy.ContextResource[]findResources()
Return the defined resource references for this application. If none have been defined, a zero-length array is returned.

public java.lang.String[]findWrapperLifecycles()
Return the set of LifecycleListener classes that will be added to newly created Wrappers automatically.

public java.lang.String[]findWrapperListeners()
Return the set of ContainerListener classes that will be added to newly created Wrappers automatically.

public booleangetCookies()
Return the "use cookies for session ids" flag.

public booleangetCrossContext()
Return the "allow crossing servlet contexts" flag.

public java.lang.StringgetInfo()
Return descriptive information about this Container implementation and the corresponding version number, in the format <description>/<version>.

public LoadergetLoader()
Return the Loader with which this Container is associated. If there is no associated Loader return null.

public ManagergetManager()
Return the Manager with which this Container is associated. If there is no associated Manager return null.

public java.lang.StringgetName()
Return the name of this DefaultContext

public org.apache.catalina.deploy.NamingResourcesgetNamingResources()
Return the naming resources associated with this web application.

public ContainergetParent()
Return the Container for which this Container is a child, if there is one. If there is no defined parent, return null.

public booleangetReloadable()
Return the reloadable flag for this web application.

public javax.naming.directory.DirContextgetResources()
Get the resources DirContext object with which this Container is associated.

param
resources The new associated DirContext

public java.lang.StringgetWrapperClass()
Return the Java class name of the Wrapper implementation used for servlets registered in this Context.

public voidimportDefaultContext(Context context)
Import the configuration from the DefaultContext into current Context.

param
context current web application context

public voidremoveApplicationListener(java.lang.String listener)
Remove the specified application listener class from the set of listeners for this application.

param
listener Java class name of the listener to be removed

public voidremoveApplicationParameter(java.lang.String name)
Remove the application parameter with the specified name from the set for this application.

param
name Name of the application parameter to remove

public voidremoveEjb(java.lang.String name)
Remove any EJB resource reference with the specified name.

param
name Name of the EJB resource reference to remove

public voidremoveEnvironment(java.lang.String name)
Remove any environment entry with the specified name.

param
name Name of the environment entry to remove

public voidremoveInstanceListener(java.lang.String listener)
Remove a class name from the set of InstanceListener classes that will be added to newly created Wrappers.

param
listener Class name of an InstanceListener class to be removed

public voidremoveParameter(java.lang.String name)
Remove the context initialization parameter with the specified name, if it exists; otherwise, no action is taken.

param
name Name of the parameter to remove

public voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component.

param
listener The listener to remove

public voidremoveResource(java.lang.String name)
Remove any resource reference with the specified name.

param
name Name of the resource reference to remove

public voidremoveResourceEnvRef(java.lang.String name)
Remove any resource environment reference with the specified name.

param
name Name of the resource environment reference to remove

public voidremoveResourceLink(java.lang.String name)
Remove any resource link with the specified name.

param
name Name of the resource link to remove

public voidremoveWrapperLifecycle(java.lang.String listener)
Remove a class name from the set of LifecycleListener classes that will be added to newly created Wrappers.

param
listener Class name of a LifecycleListener class to be removed

public voidremoveWrapperListener(java.lang.String listener)
Remove a class name from the set of ContainerListener classes that will be added to newly created Wrappers.

param
listener Class name of a ContainerListener class to be removed

public voidsetCookies(boolean cookies)
Set the "use cookies for session ids" flag.

param
cookies The new flag

public voidsetCrossContext(boolean crossContext)
Set the "allow crossing servlet contexts" flag.

param
crossContext The new cross contexts flag

public voidsetLoader(Loader loader)
Set the Loader with which this Context is associated.

param
loader The newly associated loader

public voidsetManager(Manager manager)
Set the Manager with which this Container is associated.

param
manager The newly associated Manager

public voidsetName(java.lang.String name)
Set the name of the default context.

param
name The new name

public voidsetParent(Container container)
Set the parent Container to which this Container is being added as a child. This Container may refuse to become attached to the specified Container by throwing an exception.

param
container Container to which this Container is being added as a child
exception
IllegalArgumentException if this Container refuses to become attached to the specified Container

public voidsetReloadable(boolean reloadable)
Set the reloadable flag for this web application.

param
reloadable The new reloadable flag

public voidsetResources(javax.naming.directory.DirContext resources)
Set the resources DirContext object with which this Container is associated.

param
resources The newly associated DirContext

public voidsetWrapperClass(java.lang.String wrapperClass)
Set the Java class name of the Wrapper implementation used for servlets registered in this Context.

param
wrapperClass The new wrapper class