FileDocCategorySizeDatePackage
PwcWebModule.javaAPI DocGlassfish v2 API11324Fri May 04 22:35:28 BST 2007com.sun.enterprise.web

PwcWebModule

public abstract class PwcWebModule extends org.apache.catalina.core.StandardContext
Class representing a web module (servlet context).

Fields Summary
private String
_id
private com.sun.enterprise.web.session.SessionCookieConfig
_cookieConfig
private boolean
_useResponseCTForHeaders
private boolean
_encodeCookies
Determines whether or not we should encode the cookies. By default cookies are not URL encoded.
private int
pollInterval
private int
reapInterval
private int
stmPoolSize
Maximum number of SingleThreadModel instances for each wrapper in this context.
private boolean
hasWebServices
Rave required attribute True if the web-module implements web services endpoints.
private String[]
endpointAddresses
Rave required attribute An array of URL addresses defined in this web-module to invoke web services endpoints implementations.
private String
contextRoot
private boolean
hasWebXml
private String
moduleName
private String[]
cacheControls
protected String
formHintField
protected String
defaultCharset
Constructors Summary
Methods Summary
public org.apache.catalina.WrappercreateWrapper()
Factory method to create and return a new Wrapper instance, of the Java implementation class appropriate for this Context implementation. The constructor of the instantiated Wrapper will have been called, but no properties will have been set.

        Wrapper wrapper = super.createWrapper();
        ((StandardWrapper) wrapper).setMaxInstances(stmPoolSize);
        return wrapper;
    
public java.lang.String[]getCacheControls()
Gets the Cache-Control settings of this web module.

return
Cache-Control settings of this web module, or null if no such settings exist for this web module.

        return cacheControls;
    
public java.lang.StringgetContextRoot()
Gets this web module's context root.

return
Web module context root

        return contextRoot;
    
public java.lang.StringgetDefaultCharset()
Gets the value of the default-charset attribute of the parameter-encoding element

return
Value of the default-charset attribute of the parameter-encoding element, or null if not present

        return defaultCharset;
    
public booleangetEncodeCookies()
return _encodeCookies property value

        return _encodeCookies;
    
public java.lang.String[]getEndpointAddresses()
Gets the URL addresses corresponding to the web services endpoints of this web module.

return
Array of URL addresses corresponding to the web services endpoints of this web module

        return endpointAddresses;
    
public java.lang.StringgetFormHintField()
return parameter-encoding form-hint-field attribute value

        return formHintField;
    
public booleangetHasWebServices()
Return the hasWebServices flag for this web module.

        return hasWebServices;
    
public java.lang.StringgetID()
Gets this web module's identifier.

return
Web module identifier


        
                  
       
        return _id;
    
public java.lang.StringgetModuleName()
Gets this web module's name.

return
Web module name

        return this.moduleName;
    
public booleangetResponseCTForHeaders()
return _useResponseCTForHeaders property value

        return _useResponseCTForHeaders;
    
public intgetSTMPoolSize()
Return maximum number of instances that will be allocated when a single thread model servlet is used in this web module.

        return (this.stmPoolSize);
    
public com.sun.enterprise.web.session.SessionCookieConfiggetSessionCookieConfig()
Return the session cookie configuration for this web module.

        return _cookieConfig;
    
public abstract booleanhasLocaleToCharsetMapping()
Returns true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise.

return
true if this web module specifies a locale-charset-map in its sun-web.xml, false otherwise

booleanhasWebXml()

        return hasWebXml;
    
public abstract java.lang.StringmapLocalesToCharset(java.util.Enumeration locales)
Matches the given request locales against the charsets specified in the locale-charset-map of this web module's sun-web.xml, and returns the first matching charset.

param
locales Request locales
return
First matching charset, or null if this web module does not specify any locale-charset-map in its sun-web.xml, or no match was found

public voidsetCacheControls(java.lang.String[] cacheControls)
Sets the Cache-Control configuration for this web module.

param
cacheControls Cache-Control configuration settings for this web module

        this.cacheControls = cacheControls;
    
public voidsetContextRoot(java.lang.String contextRoot)
Sets this web module's context root.

param
contextRoot Web module context root

        this.contextRoot = contextRoot;
    
public voidsetEncodeCookies(boolean flag)
Determines whether cookies should be encoded or not. If the property encodeCookies is set to false in sun-web.xml, cookies will not be URL encoded. The default behaviuor is that we always encode the cookies unless the property encodeCookies is set to false in sun-web.xml.

        _encodeCookies = flag;
    
public voidsetEndpointAddresses(java.lang.String[] endpointAddresses)
Sets the URL addresses corresponding to the web services endpoints of this web module.

param
endpointAddresses Array of URL addresses corresponding to the web services endpoints of this web module

        this.endpointAddresses = (String[])endpointAddresses.clone();
    
public voidsetHasWebServices(boolean hasWebServices)
Set the hasWebServices boolean flag for this web module.

param
hasWebServices boolean flag hasWebServices for this web module

        this.hasWebServices = hasWebServices;
    
voidsetHasWebXml(boolean hasWebXml)

        this.hasWebXml = hasWebXml;
    
public voidsetID(java.lang.String id)
Sets this web module's identifier.

param
id Web module identifier

        _id = id;
    
public voidsetModuleName(java.lang.String moduleName)
Sets this web module's name.

param
moduleName Web module name

        this.moduleName = moduleName;
    
public voidsetResponseCTForHeaders()
sets _useResponseCTForHeaders property value. When _useResponseCTForHeaders is set to true, it means that we send the response header in the same encoding of the response charset instead of UTF-8, (see the method sendHeaders in com.sun.enterprise.web.connector.nsapi.nsapiNSAPIResponse)

        _useResponseCTForHeaders = true;
    
public voidsetSTMPoolSize(int newPoolSize)
Set the maximum number of instances that will be allocated when a single thread model servlet is used in this web module.

param
newPoolSize New value of SingleThreadModel servlet pool size

     
        int oldPoolSize = this.stmPoolSize;
        this.stmPoolSize = newPoolSize;
        support.firePropertyChange("stmPoolSize", Integer.valueOf(oldPoolSize),
                                   Integer.valueOf(this.stmPoolSize));
    
public voidsetSessionCookieConfig(com.sun.enterprise.web.session.SessionCookieConfig cookieConfig)
Set the session cookie configuration for this web module.

param
cookieConfig The new session cookie configuration

        _cookieConfig = cookieConfig;