Fields Summary |
---|
private Hashtable | contextsContexts we are currently associated with. |
private String[] | applicationListenersThe set of application listener class names configured for this
application, in the order they were encountered in the web.xml file. |
private org.apache.catalina.deploy.ApplicationParameter[] | applicationParametersThe set of application parameters defined for this application. |
private boolean | cookiesShould we attempt to use cookies for session id communication? |
private boolean | crossContextShould we allow the ServletContext.getContext() method
to access the context of other web applications in this server? |
private static final String | infoThe descriptive information string for this implementation. |
private String[] | instanceListenersThe set of classnames of InstanceListeners that will be added
to each newly created Wrapper by createWrapper() . |
private String | mapperClassThe Java class name of the default Mapper class for this Container. |
private org.apache.catalina.deploy.NamingResources | namingResourcesThe associated naming resources. |
private HashMap | parametersThe context initialization parameters for this web application,
keyed by name. |
private boolean | reloadableThe reloadable flag for this web application. |
private boolean | swallowOutputThe swallowOutput flag for this web application. |
private String[] | wrapperLifecyclesThe set of classnames of LifecycleListeners that will be added
to each newly created Wrapper by createWrapper() . |
private String[] | wrapperListenersThe set of classnames of ContainerListeners that will be added
to each newly created Wrapper by createWrapper() . |
private String | wrapperClassJava class name of the Wrapper class implementation we use. |
private boolean | useNamingJNDI use flag. |
DirContext | dirContextThe resources DirContext object with which this Container is
associated. |
protected String | nameThe human-readable name of this Container. |
protected org.apache.catalina.Container | parentThe parent Container to which this Container is a child. |
protected Vector | lifecycleThe Context LifecycleListener's |
protected org.apache.catalina.Loader | loaderThe Loader implementation with which this Container is associated. |
protected org.apache.catalina.Manager | managerThe Manager implementation with which this Container is associated. |
protected boolean | caseSensitiveCase sensitivity. |
protected boolean | allowLinkingAllow linking. |
protected int | cacheMaxSizeCache max size in KB. |
protected int | cacheTTLCache TTL in ms. |
protected boolean | cachingAllowedCachingAllowed. |
protected int | managerChecksFrequencyFrequency of manager checks. |
protected static final org.apache.catalina.util.StringManager | smThe string manager for this package. |
protected PropertyChangeSupport | supportThe property change support for this component. |
protected String | type |
protected String | domain |
protected String | suffix |
protected ObjectName | oname |
protected MBeanServer | mserver |
Methods Summary |
---|
public void | addApplicationListener(java.lang.String listener)Add a new Listener class name to the set of Listeners
configured for this application.
synchronized (applicationListeners) {
String results[] =new String[applicationListeners.length + 1];
for (int i = 0; i < applicationListeners.length; i++)
results[i] = applicationListeners[i];
results[applicationListeners.length] = listener;
applicationListeners = results;
}
|
public void | addApplicationParameter(org.apache.catalina.deploy.ApplicationParameter parameter)Add a new application parameter for this application.
synchronized (applicationParameters) {
ApplicationParameter results[] =
new ApplicationParameter[applicationParameters.length + 1];
System.arraycopy(applicationParameters, 0, results, 0,
applicationParameters.length);
results[applicationParameters.length] = parameter;
applicationParameters = results;
}
|
public void | addEjb(org.apache.catalina.deploy.ContextEjb ejb)Add an EJB resource reference for this web application.
namingResources.addEjb(ejb);
|
public void | addEnvironment(org.apache.catalina.deploy.ContextEnvironment environment)Add an environment entry for this web application.
namingResources.addEnvironment(environment);
|
public java.lang.String | addEnvironment(java.lang.String envName, java.lang.String type)Add an environment entry for this web application.
NamingResources nresources = getNamingResources();
if (nresources == null) {
return null;
}
ContextEnvironment env = nresources.findEnvironment(envName);
if (env != null) {
throw new IllegalArgumentException
("Invalid environment name - already exists '" + envName + "'");
}
env = new ContextEnvironment();
env.setName(envName);
env.setType(type);
nresources.addEnvironment(env);
// Return the corresponding MBean name
ManagedBean managed = Registry.getRegistry().findManagedBean("ContextEnvironment");
ObjectName oname =
MBeanUtils.createObjectName(managed.getDomain(), env);
return (oname.toString());
|
public void | addInstanceListener(java.lang.String listener)Add the classname of an InstanceListener to be added to each
Wrapper appended to this Context.
synchronized (instanceListeners) {
String results[] =new String[instanceListeners.length + 1];
for (int i = 0; i < instanceListeners.length; i++)
results[i] = instanceListeners[i];
results[instanceListeners.length] = listener;
instanceListeners = results;
}
|
public void | addLifecycleListener(org.apache.catalina.LifecycleListener listener)Add a lifecycle event listener to this component.
lifecycle.add(listener);
|
public void | addParameter(java.lang.String name, java.lang.String value)Add a new context initialization parameter, replacing any existing
value for the specified name.
// Validate the proposed context initialization parameter
if ((name == null) || (value == null))
throw new IllegalArgumentException
(sm.getString("standardContext.parameter.required"));
if (parameters.get(name) != null)
throw new IllegalArgumentException
(sm.getString("standardContext.parameter.duplicate", name));
// Add this parameter to our defined set
synchronized (parameters) {
parameters.put(name, value);
}
|
public void | addPropertyChangeListener(java.beans.PropertyChangeListener listener)Add a property change listener to this component.
support.addPropertyChangeListener(listener);
|
public void | addResource(org.apache.catalina.deploy.ContextResource resource)Add a resource reference for this web application.
namingResources.addResource(resource);
|
public java.lang.String | addResource(java.lang.String resourceName, java.lang.String type)Add a resource reference for this web application.
NamingResources nresources = getNamingResources();
if (nresources == null) {
return null;
}
ContextResource resource = nresources.findResource(resourceName);
if (resource != null) {
throw new IllegalArgumentException
("Invalid resource name - already exists'" + resourceName + "'");
}
resource = new ContextResource();
resource.setName(resourceName);
resource.setType(type);
nresources.addResource(resource);
// Return the corresponding MBean name
ManagedBean managed = Registry.getRegistry().findManagedBean("ContextResource");
ObjectName oname =
MBeanUtils.createObjectName(managed.getDomain(), resource);
return (oname.toString());
|
public void | addResourceEnvRef(java.lang.String name, java.lang.String type)Add a resource environment reference for this web application.
namingResources.addResourceEnvRef(name, type);
|
public void | addResourceLink(org.apache.catalina.deploy.ContextResourceLink resourceLink)Add a resource link for this web application.
namingResources.addResourceLink(resourceLink);
|
public 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.
NamingResources nresources = getNamingResources();
if (nresources == null) {
return null;
}
ContextResourceLink resourceLink =
nresources.findResourceLink(resourceLinkName);
if (resourceLink != null) {
throw new IllegalArgumentException
("Invalid resource link name - already exists'" +
resourceLinkName + "'");
}
resourceLink = new ContextResourceLink();
resourceLink.setGlobal(global);
resourceLink.setName(resourceLinkName);
resourceLink.setType(type);
nresources.addResourceLink(resourceLink);
// Return the corresponding MBean name
ManagedBean managed = Registry.getRegistry().findManagedBean("ContextResourceLink");
ObjectName oname =
MBeanUtils.createObjectName(managed.getDomain(), resourceLink);
return (oname.toString());
|
public void | addResourceParams(org.apache.catalina.deploy.ResourceParams resourceParameters)Add resource parameters for this web application.
namingResources.addResourceParams(resourceParameters);
|
public void | addWrapperLifecycle(java.lang.String listener)Add the classname of a LifecycleListener to be added to each
Wrapper appended to this Context.
synchronized (wrapperLifecycles) {
String results[] =new String[wrapperLifecycles.length + 1];
for (int i = 0; i < wrapperLifecycles.length; i++)
results[i] = wrapperLifecycles[i];
results[wrapperLifecycles.length] = listener;
wrapperLifecycles = results;
}
|
public void | addWrapperListener(java.lang.String listener)Add the classname of a ContainerListener to be added to each
Wrapper appended to this Context.
synchronized (wrapperListeners) {
String results[] =new String[wrapperListeners.length + 1];
for (int i = 0; i < wrapperListeners.length; i++)
results[i] = wrapperListeners[i];
results[wrapperListeners.length] = listener;
wrapperListeners = results;
}
|
public java.lang.String[] | findApplicationListeners()Return the set of application listener class names configured
for this application.
return (applicationListeners);
|
public org.apache.catalina.deploy.ApplicationParameter[] | findApplicationParameters()Return the set of application parameters for this application.
return (applicationParameters);
|
public org.apache.catalina.deploy.ContextEjb | findEjb(java.lang.String name)Return the EJB resource reference with the specified name, if any;
otherwise, return null .
return namingResources.findEjb(name);
|
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.
return namingResources.findEjbs();
|
public org.apache.catalina.deploy.ContextEnvironment | findEnvironment(java.lang.String name)Return the environment entry with the specified name, if any;
otherwise, return null .
return namingResources.findEnvironment(name);
|
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.
return namingResources.findEnvironments();
|
public java.lang.String[] | findInstanceListeners()Return the set of InstanceListener classes that will be added to
newly created Wrappers automatically.
return (instanceListeners);
|
public java.lang.String | findParameter(java.lang.String name)Return the value for the specified context initialization
parameter name, if any; otherwise return null .
synchronized (parameters) {
return ((String) parameters.get(name));
}
|
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.
synchronized (parameters) {
String results[] = new String[parameters.size()];
return ((String[]) parameters.keySet().toArray(results));
}
|
public org.apache.catalina.deploy.ContextResource | findResource(java.lang.String name)Return the resource reference with the specified name, if any;
otherwise return null .
return namingResources.findResource(name);
|
public java.lang.String | findResourceEnvRef(java.lang.String name)Return the resource environment reference type for the specified
name, if any; otherwise return null .
return namingResources.findResourceEnvRef(name);
|
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.
return namingResources.findResourceEnvRefs();
|
public org.apache.catalina.deploy.ContextResourceLink | findResourceLink(java.lang.String name)Return the resource link with the specified name, if any;
otherwise return null .
return namingResources.findResourceLink(name);
|
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.
return namingResources.findResourceLinks();
|
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.
return namingResources.findResourceParams();
|
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.
return namingResources.findResources();
|
public java.lang.String[] | findWrapperLifecycles()Return the set of LifecycleListener classes that will be added to
newly created Wrappers automatically.
return (wrapperLifecycles);
|
public java.lang.String[] | findWrapperListeners()Return the set of ContainerListener classes that will be added to
newly created Wrappers automatically.
return (wrapperListeners);
|
public int | getCacheMaxSize()Return the maximum size of the cache in KB.
return cacheMaxSize;
|
public int | getCacheTTL()Get cache TTL.
return cacheTTL;
|
public boolean | getCookies()Return the "use cookies for session ids" flag.
return (this.cookies);
|
public boolean | getCrossContext()Return the "allow crossing servlet contexts" flag.
return (this.crossContext);
|
public java.lang.String | getDomain()
return domain;
|
public java.lang.String[] | getEnvironments()Return the MBean Names of the set of defined environment entries for
this web application
ContextEnvironment[] envs = getNamingResources().findEnvironments();
ArrayList results = new ArrayList();
for (int i = 0; i < envs.length; i++) {
try {
ObjectName oname =
MBeanUtils.createObjectName(this.getDomain(), envs[i]);
results.add(oname.toString());
} catch (MalformedObjectNameException e) {
IllegalArgumentException iae = new IllegalArgumentException
("Cannot create object name for environment " + envs[i]);
iae.initCause(e);
throw iae;
}
}
return ((String[]) results.toArray(new String[results.size()]));
|
public java.lang.String | getInfo()Return descriptive information about this Container implementation and
the corresponding version number, in the format
<description>/<version> .
return (info);
|
protected java.lang.String | getJSR77Suffix()
return suffix;
|
public org.apache.catalina.Loader | getLoader()Return the Loader with which this Container is associated. If there is
no associated Loader return null .
return loader;
|
public org.apache.catalina.Manager | getManager()Return the Manager with which this Container is associated. If there is
no associated Manager return null .
return manager;
|
public int | getManagerChecksFrequency()Get manager checks frquency.
return managerChecksFrequency;
|
public java.lang.String | getName()The name of this DefaultContext
return (this.name);
|
public org.apache.catalina.deploy.NamingResources | getNamingResources()Return the naming resources associated with this web application.
return (this.namingResources);
|
public javax.management.ObjectName | getObjectName()
return oname;
|
public org.apache.catalina.Container | getParent()Return the Container for which this Container is a child, if there is
one. If there is no defined parent, return null .
return (parent);
|
public boolean | getReloadable()Return the reloadable flag for this web application.
return (this.reloadable);
|
public java.lang.String[] | getResourceLinks()Return the MBean Names of all the defined resource links for this
application
ContextResourceLink[] links = getNamingResources().findResourceLinks();
ArrayList results = new ArrayList();
for (int i = 0; i < links.length; i++) {
try {
ObjectName oname =
MBeanUtils.createObjectName(getDomain(), links[i]);
results.add(oname.toString());
} catch (MalformedObjectNameException e) {
IllegalArgumentException iae = new IllegalArgumentException
("Cannot create object name for resource " + links[i]);
iae.initCause(e);
throw iae;
}
}
return ((String[]) results.toArray(new String[results.size()]));
|
public java.lang.String[] | getResourceNames()Return the MBean Names of all the defined resource references for this
application.
XXX This changed - due to conflict
ContextResource[] resources = getNamingResources().findResources();
ArrayList results = new ArrayList();
for (int i = 0; i < resources.length; i++) {
try {
ObjectName oname =
MBeanUtils.createObjectName(getDomain(), resources[i]);
results.add(oname.toString());
} catch (MalformedObjectNameException e) {
IllegalArgumentException iae = new IllegalArgumentException
("Cannot create object name for resource " + resources[i]);
iae.initCause(e);
throw iae;
}
}
return ((String[]) results.toArray(new String[results.size()]));
|
public javax.naming.directory.DirContext | getResources()Get the resources DirContext object with which this Container is
associated.
return this.dirContext;
|
public boolean | getSwallowOutput()Return the swallowOutput flag for this web application.
return (this.swallowOutput);
|
public java.lang.String | getType()
return type;
|
public java.lang.String | getWrapperClass()Return the Java class name of the Wrapper implementation used
for servlets registered in this Context.
return (this.wrapperClass);
|
public void | importDefaultContext(org.apache.catalina.Context context)Import the configuration from the DefaultContext into
current Context.
context.setCookies(getCookies());
context.setCrossContext(getCrossContext());
context.setReloadable(getReloadable());
String [] listeners = findApplicationListeners();
for( int i = 0; i < listeners.length; i++ ) {
context.addApplicationListener(listeners[i]);
}
listeners = findInstanceListeners();
for( int i = 0; i < listeners.length; i++ ) {
context.addInstanceListener(listeners[i]);
}
String [] wrapper = findWrapperListeners();
for( int i = 0; i < wrapper.length; i++ ) {
context.addWrapperListener(wrapper[i]);
}
wrapper = findWrapperLifecycles();
for( int i = 0; i < wrapper.length; i++ ) {
context.addWrapperLifecycle(wrapper[i]);
}
String [] parameters = findParameters();
for( int i = 0; i < parameters.length; i++ ) {
context.addParameter(parameters[i],findParameter(parameters[i]));
}
ApplicationParameter [] appParam = findApplicationParameters();
for( int i = 0; i < appParam.length; i++ ) {
context.addApplicationParameter(appParam[i]);
}
if (!(context instanceof StandardContext)) {
ContextEjb [] contextEjb = findEjbs();
for( int i = 0; i < contextEjb.length; i++ ) {
context.addEjb(contextEjb[i]);
}
ContextEnvironment [] contextEnv = findEnvironments();
for( int i = 0; i < contextEnv.length; i++ ) {
context.addEnvironment(contextEnv[i]);
}
/*
if (context instanceof StandardContext) {
ResourceParams [] resourceParams = findResourceParams();
for( int i = 0; i < resourceParams.length; i++ ) {
((StandardContext)context).addResourceParams
(resourceParams[i]);
}
}
*/
ContextResource [] resources = findResources();
for( int i = 0; i < resources.length; i++ ) {
context.addResource(resources[i]);
}
ContextResourceLink [] resourceLinks = findResourceLinks();
for( int i = 0; i < resourceLinks.length; i++ ) {
context.addResourceLink(resourceLinks[i]);
}
String [] envRefs = findResourceEnvRefs();
for( int i = 0; i < envRefs.length; i++ ) {
context.addResourceEnvRef
(envRefs[i],findResourceEnvRef(envRefs[i]));
}
}
|
public void | installDefaultContext(org.apache.catalina.Context context)Install the StandardContext portion of the DefaultContext
configuration into current Context.
if (context instanceof StandardContext) {
((StandardContext)context).setUseNaming(isUseNaming());
((StandardContext)context).setSwallowOutput(getSwallowOutput());
((StandardContext)context).setCachingAllowed(isCachingAllowed());
((StandardContext)context).setCacheTTL(getCacheTTL());
((StandardContext)context).setCacheMaxSize(getCacheMaxSize());
((StandardContext)context).setAllowLinking(isAllowLinking());
((StandardContext)context).setCaseSensitive(isCaseSensitive());
((StandardContext)context).setManagerChecksFrequency
(getManagerChecksFrequency());
if (!contexts.containsKey(context)) {
((StandardContext) context).addLifecycleListener(this);
}
Enumeration lifecycleListeners = lifecycle.elements();
while (lifecycleListeners.hasMoreElements()) {
((StandardContext)context).addLifecycleListener(
(LifecycleListener)lifecycleListeners.nextElement());
}
}
if (!context.getPrivileged() && loader != null) {
ClassLoader parentClassLoader = context.getParent().getParentClassLoader();
Class clazz = loader.getClass();
Class types[] = { ClassLoader.class };
Object args[] = { parentClassLoader };
try {
Constructor constructor = clazz.getDeclaredConstructor(types);
Loader context_loader = (Loader) constructor.newInstance(args);
context_loader.setDelegate(loader.getDelegate());
context_loader.setReloadable(loader.getReloadable());
if (loader instanceof WebappLoader) {
((WebappLoader)context_loader).setDebug
(((WebappLoader)loader).getDebug());
((WebappLoader)context_loader).setLoaderClass
(((WebappLoader)loader).getLoaderClass());
}
context.setLoader(context_loader);
} catch(Exception e) {
IllegalArgumentException iae = new IllegalArgumentException
("DefaultContext custom Loader install failed");
iae.initCause(e);
throw iae;
}
}
|
public boolean | isAllowLinking()Is linking allowed.
return allowLinking;
|
public boolean | isCachingAllowed()Is cachingAllowed ?
return cachingAllowed;
|
public boolean | isCaseSensitive()Is case sensitive ?
return caseSensitive;
|
public boolean | isUseNaming()Returns true if the internal naming support is used.
return (useNaming);
|
public void | lifecycleEvent(org.apache.catalina.LifecycleEvent event)Process the START event for an associated Context.
StandardContext context = null;
NamingContextListener listener = null;
if (event.getLifecycle() instanceof StandardContext) {
context = (StandardContext) event.getLifecycle();
LifecycleListener[] listeners = context.findLifecycleListeners();
for (int i = 0; i < listeners.length; i++) {
if (listeners[i] instanceof NamingContextListener) {
listener = (NamingContextListener) listeners[i];
break;
}
}
}
if (listener == null) {
return;
}
if ((event.getType().equals(Lifecycle.BEFORE_STOP_EVENT))
|| (event.getType().equals(Context.RELOAD_EVENT))) {
// Remove context
contexts.remove(context);
// Remove listener from the NamingResource listener list
namingResources.removePropertyChangeListener(listener);
// Remove listener from lifecycle listeners
if (!(event.getType().equals(Context.RELOAD_EVENT))) {
context.removeLifecycleListener(this);
}
}
if ((event.getType().equals(Lifecycle.AFTER_START_EVENT))
|| (event.getType().equals(Context.RELOAD_EVENT))) {
// Add context
contexts.put(context, context);
NamingResources contextResources = context.getNamingResources();
// Setting the context in read/write mode
ContextAccessController.setWritable(listener.getName(), context);
// Send notifications to the listener to add the appropriate
// resources
ContextEjb [] contextEjb = findEjbs();
for (int i = 0; i < contextEjb.length; i++) {
ContextEjb contextEntry = contextEjb[i];
if (contextResources.exists(contextEntry.getName())) {
listener.removeEjb(contextEntry.getName());
}
listener.addEjb(contextEntry);
}
ContextEnvironment [] contextEnv = findEnvironments();
for (int i = 0; i < contextEnv.length; i++) {
ContextEnvironment contextEntry = contextEnv[i];
if (contextResources.exists(contextEntry.getName())) {
listener.removeEnvironment(contextEntry.getName());
}
listener.addEnvironment(contextEntry);
}
ContextResource [] resources = findResources();
for (int i = 0; i < resources.length; i++) {
ContextResource contextEntry = resources[i];
if (contextResources.exists(contextEntry.getName())) {
listener.removeResource(contextEntry.getName());
}
listener.addResource(contextEntry);
}
ContextResourceLink [] resourceLinks = findResourceLinks();
for (int i = 0; i < resourceLinks.length; i++) {
ContextResourceLink contextEntry = resourceLinks[i];
if (contextResources.exists(contextEntry.getName())) {
listener.removeResourceLink(contextEntry.getName());
}
listener.addResourceLink(contextEntry);
}
String [] envRefs = findResourceEnvRefs();
for (int i = 0; i < envRefs.length; i++) {
if (contextResources.exists(envRefs[i])) {
listener.removeResourceEnvRef(envRefs[i]);
}
listener.addResourceEnvRef
(envRefs[i], findResourceEnvRef(envRefs[i]));
}
// Setting the context in read only mode
ContextAccessController.setReadOnly(listener.getName());
// Add listener to the NamingResources listener list
namingResources.addPropertyChangeListener(listener);
}
|
public void | postDeregister()
|
public void | postRegister(java.lang.Boolean registrationDone)
|
public void | preDeregister()
|
public javax.management.ObjectName | preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
oname=name;
mserver=server;
domain=name.getDomain();
type=name.getKeyProperty("type");
if( type==null ) {
type=name.getKeyProperty("j2eeType");
}
String j2eeApp=name.getKeyProperty("J2EEApplication");
String j2eeServer=name.getKeyProperty("J2EEServer");
if( j2eeApp==null ) {
j2eeApp="none";
}
if( j2eeServer==null ) {
j2eeServer="none";
}
suffix=",J2EEApplication=" + j2eeApp + ",J2EEServer=" + j2eeServer;
return name;
|
public void | removeApplicationListener(java.lang.String listener)Remove the specified application listener class from the set of
listeners for this application.
synchronized (applicationListeners) {
// Make sure this application listener is currently present
int n = -1;
for (int i = 0; i < applicationListeners.length; i++) {
if (applicationListeners[i].equals(listener)) {
n = i;
break;
}
}
if (n < 0)
return;
// Remove the specified application listener
int j = 0;
String results[] = new String[applicationListeners.length - 1];
for (int i = 0; i < applicationListeners.length; i++) {
if (i != n)
results[j++] = applicationListeners[i];
}
applicationListeners = results;
}
|
public void | removeApplicationParameter(java.lang.String name)Remove the application parameter with the specified name from
the set for this application.
synchronized (applicationParameters) {
// Make sure this parameter is currently present
int n = -1;
for (int i = 0; i < applicationParameters.length; i++) {
if (name.equals(applicationParameters[i].getName())) {
n = i;
break;
}
}
if (n < 0)
return;
// Remove the specified parameter
int j = 0;
ApplicationParameter results[] =
new ApplicationParameter[applicationParameters.length - 1];
for (int i = 0; i < applicationParameters.length; i++) {
if (i != n)
results[j++] = applicationParameters[i];
}
applicationParameters = results;
}
|
public void | removeEjb(java.lang.String name)Remove any EJB resource reference with the specified name.
namingResources.removeEjb(name);
|
public void | removeEnvironment(java.lang.String envName)Remove any environment entry with the specified name.
NamingResources nresources = getNamingResources();
if (nresources == null) {
return;
}
ContextEnvironment env = nresources.findEnvironment(envName);
if (env == null) {
throw new IllegalArgumentException
("Invalid environment name '" + envName + "'");
}
nresources.removeEnvironment(envName);
|
public void | removeInstanceListener(java.lang.String listener)Remove a class name from the set of InstanceListener classes that
will be added to newly created Wrappers.
synchronized (instanceListeners) {
// Make sure this InstanceListener is currently present
int n = -1;
for (int i = 0; i < instanceListeners.length; i++) {
if (instanceListeners[i].equals(listener)) {
n = i;
break;
}
}
if (n < 0)
return;
// Remove the specified InstanceListener
int j = 0;
String results[] = new String[instanceListeners.length - 1];
for (int i = 0; i < instanceListeners.length; i++) {
if (i != n)
results[j++] = instanceListeners[i];
}
instanceListeners = results;
}
|
public void | removeParameter(java.lang.String name)Remove the context initialization parameter with the specified
name, if it exists; otherwise, no action is taken.
synchronized (parameters) {
parameters.remove(name);
}
|
public void | removePropertyChangeListener(java.beans.PropertyChangeListener listener)Remove a property change listener from this component.
support.removePropertyChangeListener(listener);
|
public void | removeResource(java.lang.String resourceName)Remove any resource reference with the specified name.
// That should be done in the UI
// resourceName = URLDecoder.decode(resourceName);
NamingResources nresources = getNamingResources();
if (nresources == null) {
return;
}
ContextResource resource = nresources.findResource(resourceName);
if (resource == null) {
throw new IllegalArgumentException
("Invalid resource name '" + resourceName + "'");
}
nresources.removeResource(resourceName);
|
public void | removeResourceEnvRef(java.lang.String name)Remove any resource environment reference with the specified name.
namingResources.removeResourceEnvRef(name);
|
public void | removeResourceLink(java.lang.String resourceLinkName)Remove any resource link with the specified name.
//resourceLinkName = URLDecoder.decode(resourceLinkName);
NamingResources nresources = getNamingResources();
if (nresources == null) {
return;
}
ContextResourceLink resource = nresources.findResourceLink(resourceLinkName);
if (resource == null) {
throw new IllegalArgumentException
("Invalid resource name '" + resourceLinkName + "'");
}
nresources.removeResourceLink(resourceLinkName);
|
public void | removeWrapperLifecycle(java.lang.String listener)Remove a class name from the set of LifecycleListener classes that
will be added to newly created Wrappers.
synchronized (wrapperLifecycles) {
// Make sure this LifecycleListener is currently present
int n = -1;
for (int i = 0; i < wrapperLifecycles.length; i++) {
if (wrapperLifecycles[i].equals(listener)) {
n = i;
break;
}
}
if (n < 0)
return;
// Remove the specified LifecycleListener
int j = 0;
String results[] = new String[wrapperLifecycles.length - 1];
for (int i = 0; i < wrapperLifecycles.length; i++) {
if (i != n)
results[j++] = wrapperLifecycles[i];
}
wrapperLifecycles = results;
}
|
public void | removeWrapperListener(java.lang.String listener)Remove a class name from the set of ContainerListener classes that
will be added to newly created Wrappers.
synchronized (wrapperListeners) {
// Make sure this ContainerListener is currently present
int n = -1;
for (int i = 0; i < wrapperListeners.length; i++) {
if (wrapperListeners[i].equals(listener)) {
n = i;
break;
}
}
if (n < 0)
return;
// Remove the specified ContainerListener
int j = 0;
String results[] = new String[wrapperListeners.length - 1];
for (int i = 0; i < wrapperListeners.length; i++) {
if (i != n)
results[j++] = wrapperListeners[i];
}
wrapperListeners = results;
}
|
public void | setAllowLinking(boolean allowLinking)Set allow linking.
this.allowLinking = allowLinking;
|
public void | setCacheMaxSize(int cacheMaxSize)Set the maximum size of the cache in KB.
this.cacheMaxSize = cacheMaxSize;
|
public void | setCacheTTL(int cacheTTL)Set cache TTL.
this.cacheTTL = cacheTTL;
|
public void | setCachingAllowed(boolean cachingAllowed)Set cachingAllowed.
this.cachingAllowed = cachingAllowed;
|
public void | setCaseSensitive(boolean caseSensitive)Set case sensitivity.
// ----------------------------------------------------- Context Properties
this.caseSensitive = caseSensitive;
|
public void | setCookies(boolean cookies)Set the "use cookies for session ids" flag.
boolean oldCookies = this.cookies;
this.cookies = cookies;
|
public void | setCrossContext(boolean crossContext)Set the "allow crossing servlet contexts" flag.
boolean oldCrossContext = this.crossContext;
this.crossContext = crossContext;
|
public void | setLoader(org.apache.catalina.Loader loader)Set the Loader with which this Context is associated.
Loader oldLoader = this.loader;
this.loader = loader;
// Report this property change to interested listeners
support.firePropertyChange("loader", oldLoader, this.loader);
|
public void | setManager(org.apache.catalina.Manager manager)Set the Manager with which this Container is associated.
Manager oldManager = this.manager;
this.manager = manager;
// Report this property change to interested listeners
support.firePropertyChange("manager", oldManager, this.manager);
|
public void | setManagerChecksFrequency(int managerChecksFrequency)Set the manager checks frequency.
this.managerChecksFrequency = managerChecksFrequency;
|
public void | setName(java.lang.String name)
this.name = name;
|
public void | setParent(org.apache.catalina.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.
Container oldParent = this.parent;
this.parent = container;
support.firePropertyChange("parent", oldParent, this.parent);
|
public void | setReloadable(boolean reloadable)Set the reloadable flag for this web application.
boolean oldReloadable = this.reloadable;
this.reloadable = reloadable;
|
public void | setResources(javax.naming.directory.DirContext resources)Set the resources DirContext object with which this Container is
associated.
this.dirContext = resources;
|
public void | setSwallowOutput(boolean swallowOutput)Set the swallowOutput flag for this web application.
boolean oldSwallowOutput = this.swallowOutput;
this.swallowOutput = swallowOutput;
|
public void | setUseNaming(boolean useNaming)Enables or disables naming.
this.useNaming = useNaming;
|
public void | setWrapperClass(java.lang.String wrapperClass)Set the Java class name of the Wrapper implementation used
for servlets registered in this Context.
this.wrapperClass = wrapperClass;
|
public java.lang.String | toString()Return a String representation of this component.
StringBuffer sb = new StringBuffer();
if (getParent() != null) {
sb.append(getParent().toString());
sb.append(".");
}
sb.append("DefaultContext[");
sb.append("]");
return (sb.toString());
|