|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.core.StandardDefaultContext
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"
.
Field Summary | |
protected boolean |
allowLinking
Allow linking. |
protected int |
cacheMaxSize
Cache max size in KB. |
protected int |
cacheTTL
Cache TTL in ms. |
protected boolean |
cachingAllowed
CachingAllowed. |
protected boolean |
caseSensitive
Case sensitivity. |
protected java.lang.String |
domain
|
protected java.util.Vector |
lifecycle
The Context LifecycleListener's |
protected Loader |
loader
The Loader implementation with which this Container is associated. |
protected Manager |
manager
The Manager implementation with which this Container is associated. |
protected int |
managerChecksFrequency
Frequency of manager checks. |
protected javax.management.MBeanServer |
mserver
|
protected java.lang.String |
name
The human-readable name of this Container. |
protected javax.management.ObjectName |
oname
|
protected Container |
parent
The parent Container to which this Container is a child. |
protected static StringManager |
sm
The string manager for this package. |
protected java.lang.String |
suffix
|
protected java.beans.PropertyChangeSupport |
support
The property change support for this component. |
protected java.lang.String |
type
|
Constructor Summary | |
StandardDefaultContext()
Create the DefaultContext |
Method Summary | |
void |
addApplicationListener(java.lang.String listener)
Add a new Listener class name to the set of Listeners configured for this application. |
void |
addApplicationParameter(ApplicationParameter parameter)
Add a new application parameter for this application. |
void |
addEjb(ContextEjb ejb)
Add an EJB resource reference for this web application. |
void |
addEnvironment(ContextEnvironment environment)
Add an environment entry for this web application. |
java.lang.String |
addEnvironment(java.lang.String envName,
java.lang.String type)
Add an environment entry for this web application. |
void |
addInstanceListener(java.lang.String listener)
Add the classname of an InstanceListener to be added to each Wrapper appended to this Context. |
void |
addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component. |
void |
addParameter(java.lang.String name,
java.lang.String value)
Add a new context initialization parameter, replacing any existing value for the specified name. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener to this component. |
void |
addResource(ContextResource resource)
Add a resource reference for this web application. |
java.lang.String |
addResource(java.lang.String resourceName,
java.lang.String type)
Add a resource reference for this web application. |
void |
addResourceEnvRef(java.lang.String name,
java.lang.String type)
Add a resource environment reference for this web application. |
void |
addResourceLink(ContextResourceLink resourceLink)
Add a resource link for this web application. |
java.lang.String |
addResourceLink(java.lang.String resourceLinkName,
java.lang.String global,
java.lang.String name,
java.lang.String type)
Add a resource link for this web application. |
void |
addResourceParams(ResourceParams resourceParameters)
Add resource parameters for this web application. |
void |
addWrapperLifecycle(java.lang.String listener)
Add the classname of a LifecycleListener to be added to each Wrapper appended to this Context. |
void |
addWrapperListener(java.lang.String listener)
Add the classname of a ContainerListener to be added to each Wrapper appended to this Context. |
java.lang.String[] |
findApplicationListeners()
Return the set of application listener class names configured for this application. |
ApplicationParameter[] |
findApplicationParameters()
Return the set of application parameters for this application. |
ContextEjb |
findEjb(java.lang.String name)
Return the EJB resource reference with the specified name, if any; otherwise, return null . |
ContextEjb[] |
findEjbs()
Return the defined EJB resource references for this application. |
ContextEnvironment |
findEnvironment(java.lang.String name)
Return the environment entry with the specified name, if any; otherwise, return null . |
ContextEnvironment[] |
findEnvironments()
Return the set of defined environment entries for this web application. |
java.lang.String[] |
findInstanceListeners()
Return the set of InstanceListener classes that will be added to newly created Wrappers automatically. |
java.lang.String |
findParameter(java.lang.String name)
Return the value for the specified context initialization parameter name, if any; otherwise return null . |
java.lang.String[] |
findParameters()
Return the names of all defined context initialization parameters for this Context. |
ContextResource |
findResource(java.lang.String name)
Return the resource reference with the specified name, if any; otherwise return null . |
java.lang.String |
findResourceEnvRef(java.lang.String name)
Return the resource environment reference type for the specified name, if any; otherwise return null . |
java.lang.String[] |
findResourceEnvRefs()
Return the set of resource environment reference names for this web application. |
ContextResourceLink |
findResourceLink(java.lang.String name)
Return the resource link with the specified name, if any; otherwise return null . |
ContextResourceLink[] |
findResourceLinks()
Return the defined resource links for this application. |
ResourceParams[] |
findResourceParams()
Return the set of defined resource parameters for this web application. |
ContextResource[] |
findResources()
Return the defined resource references for this application. |
java.lang.String[] |
findWrapperLifecycles()
Return the set of LifecycleListener classes that will be added to newly created Wrappers automatically. |
java.lang.String[] |
findWrapperListeners()
Return the set of ContainerListener classes that will be added to newly created Wrappers automatically. |
int |
getCacheMaxSize()
Return the maximum size of the cache in KB. |
int |
getCacheTTL()
Get cache TTL. |
boolean |
getCookies()
Return the "use cookies for session ids" flag. |
boolean |
getCrossContext()
Return the "allow crossing servlet contexts" flag. |
java.lang.String |
getDomain()
|
java.lang.String[] |
getEnvironments()
Return the MBean Names of the set of defined environment entries for this web application |
java.lang.String |
getInfo()
Return descriptive information about this Container implementation and the corresponding version number, in the format <description>/<version> . |
protected java.lang.String |
getJSR77Suffix()
|
Loader |
getLoader()
Return the Loader with which this Container is associated. |
Manager |
getManager()
Return the Manager with which this Container is associated. |
int |
getManagerChecksFrequency()
Get manager checks frquency. |
java.lang.String |
getName()
The name of this DefaultContext |
NamingResources |
getNamingResources()
Return the naming resources associated with this web application. |
javax.management.ObjectName |
getObjectName()
|
Container |
getParent()
Return the Container for which this Container is a child, if there is one. |
boolean |
getReloadable()
Return the reloadable flag for this web application. |
java.lang.String[] |
getResourceLinks()
Return the MBean Names of all the defined resource links for this application |
java.lang.String[] |
getResourceNames()
Return the MBean Names of all the defined resource references for this application. |
javax.naming.directory.DirContext |
getResources()
Get the resources DirContext object with which this Container is associated. |
boolean |
getSwallowOutput()
Return the swallowOutput flag for this web application. |
java.lang.String |
getType()
|
java.lang.String |
getWrapperClass()
Return the Java class name of the Wrapper implementation used for servlets registered in this Context. |
void |
importDefaultContext(Context context)
Import the configuration from the DefaultContext into current Context. |
void |
installDefaultContext(Context context)
Install the StandardContext portion of the DefaultContext configuration into current Context. |
boolean |
isAllowLinking()
Is linking allowed. |
boolean |
isCachingAllowed()
Is cachingAllowed ? |
boolean |
isCaseSensitive()
Is case sensitive ? |
boolean |
isUseNaming()
Returns true if the internal naming support is used. |
void |
lifecycleEvent(LifecycleEvent event)
Process the START event for an associated Context. |
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
|
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
|
void |
removeApplicationListener(java.lang.String listener)
Remove the specified application listener class from the set of listeners for this application. |
void |
removeApplicationParameter(java.lang.String name)
Remove the application parameter with the specified name from the set for this application. |
void |
removeEjb(java.lang.String name)
Remove any EJB resource reference with the specified name. |
void |
removeEnvironment(java.lang.String envName)
Remove any environment entry with the specified name. |
void |
removeInstanceListener(java.lang.String listener)
Remove a class name from the set of InstanceListener classes that will be added to newly created Wrappers. |
void |
removeParameter(java.lang.String name)
Remove the context initialization parameter with the specified name, if it exists; otherwise, no action is taken. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a property change listener from this component. |
void |
removeResource(java.lang.String resourceName)
Remove any resource reference with the specified name. |
void |
removeResourceEnvRef(java.lang.String name)
Remove any resource environment reference with the specified name. |
void |
removeResourceLink(java.lang.String resourceLinkName)
Remove any resource link with the specified name. |
void |
removeWrapperLifecycle(java.lang.String listener)
Remove a class name from the set of LifecycleListener classes that will be added to newly created Wrappers. |
void |
removeWrapperListener(java.lang.String listener)
Remove a class name from the set of ContainerListener classes that will be added to newly created Wrappers. |
void |
setAllowLinking(boolean allowLinking)
Set allow linking. |
void |
setCacheMaxSize(int cacheMaxSize)
Set the maximum size of the cache in KB. |
void |
setCacheTTL(int cacheTTL)
Set cache TTL. |
void |
setCachingAllowed(boolean cachingAllowed)
Set cachingAllowed. |
void |
setCaseSensitive(boolean caseSensitive)
Set case sensitivity. |
void |
setCookies(boolean cookies)
Set the "use cookies for session ids" flag. |
void |
setCrossContext(boolean crossContext)
Set the "allow crossing servlet contexts" flag. |
void |
setLoader(Loader loader)
Set the Loader with which this Context is associated. |
void |
setManager(Manager manager)
Set the Manager with which this Container is associated. |
void |
setManagerChecksFrequency(int managerChecksFrequency)
Set the manager checks frequency. |
void |
setName(java.lang.String name)
Set the name of the default context. |
void |
setParent(Container container)
Set the parent Container to which this Container is being added as a child. |
void |
setReloadable(boolean reloadable)
Set the reloadable flag for this web application. |
void |
setResources(javax.naming.directory.DirContext resources)
Set the resources DirContext object with which this Container is associated. |
void |
setSwallowOutput(boolean swallowOutput)
Set the swallowOutput flag for this web application. |
void |
setUseNaming(boolean useNaming)
Enables or disables naming. |
void |
setWrapperClass(java.lang.String wrapperClass)
Set the Java class name of the Wrapper implementation used for servlets registered in this Context. |
java.lang.String |
toString()
Return a String representation of this component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static StringManager sm
protected java.lang.String name
protected Container parent
protected java.util.Vector lifecycle
protected Loader loader
protected Manager manager
protected boolean caseSensitive
protected boolean allowLinking
protected int cacheMaxSize
protected int cacheTTL
protected boolean cachingAllowed
protected int managerChecksFrequency
protected java.beans.PropertyChangeSupport support
protected java.lang.String type
protected java.lang.String domain
protected java.lang.String suffix
protected javax.management.ObjectName oname
protected javax.management.MBeanServer mserver
Constructor Detail |
public StandardDefaultContext()
Method Detail |
public void setCaseSensitive(boolean caseSensitive)
public boolean isCaseSensitive()
public void setAllowLinking(boolean allowLinking)
public boolean isAllowLinking()
public void setCacheTTL(int cacheTTL)
public int getCacheTTL()
public int getCacheMaxSize()
public void setCacheMaxSize(int cacheMaxSize)
public void setCachingAllowed(boolean cachingAllowed)
public boolean isCachingAllowed()
public void setManagerChecksFrequency(int managerChecksFrequency)
public int getManagerChecksFrequency()
public boolean isUseNaming()
public void setUseNaming(boolean useNaming)
public boolean getCookies()
getCookies
in interface DefaultContext
public void setCookies(boolean cookies)
setCookies
in interface DefaultContext
cookies
- The new flagpublic boolean getCrossContext()
getCrossContext
in interface DefaultContext
public void setCrossContext(boolean crossContext)
setCrossContext
in interface DefaultContext
crossContext
- The new cross contexts flagpublic java.lang.String getInfo()
<description>/<version>
.
getInfo
in interface DefaultContext
public boolean getReloadable()
getReloadable
in interface DefaultContext
public void setReloadable(boolean reloadable)
setReloadable
in interface DefaultContext
reloadable
- The new reloadable flagpublic boolean getSwallowOutput()
public void setSwallowOutput(boolean swallowOutput)
swallowOutput
- The new swallowOutput flagpublic java.lang.String getWrapperClass()
getWrapperClass
in interface DefaultContext
public void setWrapperClass(java.lang.String wrapperClass)
setWrapperClass
in interface DefaultContext
wrapperClass
- The new wrapper classpublic void setResources(javax.naming.directory.DirContext resources)
setResources
in interface DefaultContext
resources
- The newly associated DirContextpublic javax.naming.directory.DirContext getResources()
getResources
in interface DefaultContext
public Loader getLoader()
null
.
getLoader
in interface DefaultContext
public void setLoader(Loader loader)
setLoader
in interface DefaultContext
loader
- The newly associated loaderpublic Manager getManager()
null
.
getManager
in interface DefaultContext
public void setManager(Manager manager)
setManager
in interface DefaultContext
manager
- The newly associated Managerpublic void addLifecycleListener(LifecycleListener listener)
listener
- The listener to addpublic java.lang.String getName()
getName
in interface DefaultContext
public void setName(java.lang.String name)
DefaultContext
setName
in interface DefaultContext
name
- The new namepublic Container getParent()
null
.
getParent
in interface DefaultContext
public void setParent(Container container)
setParent
in interface DefaultContext
container
- Container to which this Container is being added
as a child
java.lang.IllegalArgumentException
- if this Container refuses to become
attached to the specified Containerpublic void addApplicationListener(java.lang.String listener)
addApplicationListener
in interface DefaultContext
listener
- Java class name of a listener classpublic void addApplicationParameter(ApplicationParameter parameter)
addApplicationParameter
in interface DefaultContext
parameter
- The new application parameterpublic void addEjb(ContextEjb ejb)
addEjb
in interface DefaultContext
ejb
- New EJB resource referencepublic void addEnvironment(ContextEnvironment environment)
addEnvironment
in interface DefaultContext
environment
- New environment entrypublic void addResourceParams(ResourceParams resourceParameters)
addResourceParams
in interface DefaultContext
resourceParameters
- New resource parameterspublic void addInstanceListener(java.lang.String listener)
addInstanceListener
in interface DefaultContext
listener
- Java class name of an InstanceListener classpublic void addParameter(java.lang.String name, java.lang.String value)
addParameter
in interface DefaultContext
name
- Name of the new parametervalue
- Value of the new parameter
java.lang.IllegalArgumentException
- if the name or value is missing,
or if this context initialization parameter has already been
registeredpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface DefaultContext
listener
- The listener to addpublic void addResource(ContextResource resource)
addResource
in interface DefaultContext
resource
- New resource referencepublic void addResourceEnvRef(java.lang.String name, java.lang.String type)
addResourceEnvRef
in interface DefaultContext
name
- The resource environment reference nametype
- The resource environment reference typepublic void addResourceLink(ContextResourceLink resourceLink)
addResourceLink
in interface DefaultContext
public void addWrapperLifecycle(java.lang.String listener)
addWrapperLifecycle
in interface DefaultContext
listener
- Java class name of a LifecycleListener classpublic void addWrapperListener(java.lang.String listener)
addWrapperListener
in interface DefaultContext
listener
- Java class name of a ContainerListener classpublic java.lang.String[] findApplicationListeners()
findApplicationListeners
in interface DefaultContext
public ApplicationParameter[] findApplicationParameters()
findApplicationParameters
in interface DefaultContext
public ContextEjb findEjb(java.lang.String name)
null
.
findEjb
in interface DefaultContext
name
- Name of the desired EJB resource referencepublic ContextEjb[] findEjbs()
findEjbs
in interface DefaultContext
public ContextEnvironment findEnvironment(java.lang.String name)
null
.
findEnvironment
in interface DefaultContext
name
- Name of the desired environment entrypublic ContextEnvironment[] findEnvironments()
findEnvironments
in interface DefaultContext
public ResourceParams[] findResourceParams()
findResourceParams
in interface DefaultContext
public java.lang.String[] findInstanceListeners()
findInstanceListeners
in interface DefaultContext
public java.lang.String findParameter(java.lang.String name)
null
.
findParameter
in interface DefaultContext
name
- Name of the parameter to returnpublic java.lang.String[] findParameters()
findParameters
in interface DefaultContext
public ContextResource findResource(java.lang.String name)
null
.
findResource
in interface DefaultContext
name
- Name of the desired resource referencepublic java.lang.String findResourceEnvRef(java.lang.String name)
null
.
findResourceEnvRef
in interface DefaultContext
name
- Name of the desired resource environment referencepublic java.lang.String[] findResourceEnvRefs()
findResourceEnvRefs
in interface DefaultContext
public ContextResourceLink findResourceLink(java.lang.String name)
null
.
findResourceLink
in interface DefaultContext
name
- Name of the desired resource linkpublic ContextResourceLink[] findResourceLinks()
findResourceLinks
in interface DefaultContext
public ContextResource[] findResources()
findResources
in interface DefaultContext
public java.lang.String[] findWrapperLifecycles()
findWrapperLifecycles
in interface DefaultContext
public java.lang.String[] findWrapperListeners()
findWrapperListeners
in interface DefaultContext
public NamingResources getNamingResources()
getNamingResources
in interface DefaultContext
public void removeApplicationListener(java.lang.String listener)
removeApplicationListener
in interface DefaultContext
listener
- Java class name of the listener to be removedpublic void removeApplicationParameter(java.lang.String name)
removeApplicationParameter
in interface DefaultContext
name
- Name of the application parameter to removepublic void removeEjb(java.lang.String name)
removeEjb
in interface DefaultContext
name
- Name of the EJB resource reference to removepublic void removeInstanceListener(java.lang.String listener)
removeInstanceListener
in interface DefaultContext
listener
- Class name of an InstanceListener class to be removedpublic void removeParameter(java.lang.String name)
removeParameter
in interface DefaultContext
name
- Name of the parameter to removepublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface DefaultContext
listener
- The listener to removepublic void removeEnvironment(java.lang.String envName)
removeEnvironment
in interface DefaultContext
envName
- Name of the environment entry to removepublic void removeResource(java.lang.String resourceName)
removeResource
in interface DefaultContext
resourceName
- Name of the resource reference to removepublic void removeResourceLink(java.lang.String resourceLinkName)
removeResourceLink
in interface DefaultContext
resourceLinkName
- Name of the resource link to removepublic void removeResourceEnvRef(java.lang.String name)
removeResourceEnvRef
in interface DefaultContext
name
- Name of the resource environment reference to removepublic void removeWrapperLifecycle(java.lang.String listener)
removeWrapperLifecycle
in interface DefaultContext
listener
- Class name of a LifecycleListener class to be removedpublic void removeWrapperListener(java.lang.String listener)
removeWrapperListener
in interface DefaultContext
listener
- Class name of a ContainerListener class to be removedpublic void lifecycleEvent(LifecycleEvent event)
lifecycleEvent
in interface LifecycleListener
event
- The lifecycle event that has occurredpublic void installDefaultContext(Context context)
context
- current web application contextpublic void importDefaultContext(Context context)
importDefaultContext
in interface DefaultContext
context
- current web application contextpublic java.lang.String toString()
public javax.management.ObjectName getObjectName()
public java.lang.String getDomain()
public java.lang.String getType()
protected java.lang.String getJSR77Suffix()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
preRegister
in interface javax.management.MBeanRegistration
java.lang.Exception
public void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
public void preDeregister() throws java.lang.Exception
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
public void postDeregister()
postDeregister
in interface javax.management.MBeanRegistration
public java.lang.String[] getEnvironments()
public java.lang.String[] getResourceNames()
public java.lang.String[] getResourceLinks()
public java.lang.String addEnvironment(java.lang.String envName, java.lang.String type) throws javax.management.MalformedObjectNameException
envName
- New environment entry name
javax.management.MalformedObjectNameException
public java.lang.String addResource(java.lang.String resourceName, java.lang.String type) throws javax.management.MalformedObjectNameException
resourceName
- New resource reference name
javax.management.MalformedObjectNameException
public java.lang.String addResourceLink(java.lang.String resourceLinkName, java.lang.String global, java.lang.String name, java.lang.String type) throws javax.management.MalformedObjectNameException
resourceLinkName
- New resource link name
javax.management.MalformedObjectNameException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |