| java.lang.Object org.w3c.tools.resources.AttributeHolder org.w3c.tools.resources.Resource org.w3c.tools.resources.FramedResource org.w3c.jigsaw.servlet.ServletWrapper
All known Subclasses: org.w3c.jigsaw.servlet.RemoteServletWrapper,
ServletWrapper | public class ServletWrapper extends FramedResource implements ServletConfig(Code) | | author: Alexandre Rafalovitch author: Anselm Baird-Smith author: Benoit Mahe author: Yves Lafon |
Inner Class :protected class TimeoutManager implements EventHandler | |
ATTR_PARAMETERS | protected static int ATTR_PARAMETERS(Code) | | Attribute index - The init parameters for that servlet.
|
ATTR_SERVLET_CLASS | protected static int ATTR_SERVLET_CLASS(Code) | | Attributes index - The servlet class name.
|
ATTR_SERVLET_CONTEXT | protected static int ATTR_SERVLET_CONTEXT(Code) | | Attribute index - Our parent-inherited servlet context.
|
ATTR_SERVLET_INSTANCEMAX | protected static int ATTR_SERVLET_INSTANCEMAX(Code) | | Attributes index - The servlet maxinstances for single thread model
servlet instance pool size limitation, tk, 20.10.2001
|
ATTR_SERVLET_TIMEOUT | protected static int ATTR_SERVLET_TIMEOUT(Code) | | Attributes index - The servlet timeout
|
ATTR_SESSION_CONTEXT | protected static int ATTR_SESSION_CONTEXT(Code) | | Attribute index - Our parent-inherited session context.
|
debug | final protected static boolean debug(Code) | | |
global | static int global(Code) | | The overall thread cache size
|
inited | protected boolean inited(Code) | | Is our servler initialized ?
|
servletPool | final protected ServletPool servletPool(Code) | | Using a limited pool of servlet instances instead of a single
instance, tk, 22.10.2001
protected Servlet servlet = null;
|
timeoutManager | protected TimeoutManager timeoutManager(Code) | | |
acceptUnload | public boolean acceptUnload()(Code) | | |
destroyServlet | protected void destroyServlet()(Code) | | Destroy the servlet we are wrapping.
|
getInitParameter | public synchronized String getInitParameter(String string)(Code) | | Servlet stub implementation - Get an init parameter value.
|
getInitParameterNames | public synchronized Enumeration getInitParameterNames()(Code) | | Servlet stub implementation - Get all init parameters.
|
getInstanceMax | protected int getInstanceMax()(Code) | | |
getLocalServletLoader | protected AutoReloadServletLoader getLocalServletLoader()(Code) | | Get or create a suitable LocalServletLoader instance to load
that servlet.
A LocalServletLoader instance. |
getServlet | public Servlet getServlet()(Code) | | Get the servlet we are wrapping.
A servlet instance, if the servlet is alredy running, null otherwise. |
getServletClass | public String getServletClass()(Code) | | Get the class name of the wrapped servlet.
The class name for the servlet if attribute is defined. Otherwise the class name is deduced from the resource identifier. |
getServletContext | public ServletContext getServletContext()(Code) | | Servlet stub implementation - Get that servlet context.
|
getServletDirectory | public File getServletDirectory()(Code) | | The Path where we can find the servlet class file.
|
getServletName | public String getServletName()(Code) | | Returns the name of this servlet instance.
The name may be provided via server administration, assigned in the
web application deployment descriptor, or for an unregistered (and thus
unnamed) servlet instance it will be the servlet's class name.
the name of the servlet instance |
getServletParameters | public ArrayDictionary getServletParameters()(Code) | | Get the init parameters for our wrapped servlet.
An ArrayDictionary instance if the attribute is defined, false otherwise. |
getServletTimeout | protected long getServletTimeout()(Code) | | |
initialize | public void initialize(Object values)(Code) | | Initialize this servlet wrapper resource.
After the wrapper itself is inited, it performs the servlet
initialzation.
Parameters: values - The default attribute values. |
invalidateAllSession | protected void invalidateAllSession()(Code) | | |
isInited | protected boolean isInited()(Code) | | |
isServletLoaded | public boolean isServletLoaded()(Code) | | Check and eventually load the servlet we are wrapping.
This method was added for replacing getServlet() during access checks
in order to do perform checks without accessing a servlet instance.
true if and only if the sevlet has successfully been loaded |
isWrappingAServlet | protected boolean isWrappingAServlet()(Code) | | Check if the Servletclass wrapped is a Servlet class without
initializing it. (not the same than checkServlet).
used by the ServletIndexer.
See Also: org.w3c.jigsaw.servlet.ServletIndexer A boolean. |
launchServlet | protected boolean launchServlet(Class cls) throws ServletException(Code) | | Initialize our servlet from the given (loaded) class.
Parameters: cls - The servlet loaded main class. A boolean, true if servlet was successfullyinitialised, false otherwise. exception: ServletException - if servlet can't be initialized. |
launchServlet | protected boolean launchServlet() throws ClassNotFoundException, ServletException(Code) | | Launch the servlet we are wrapping.
This method either succeed, or the wrapper resource itself will fail
to initialize, acting as transparently as possible (in some sense).
A boolean, true if servlet launched. exception: ClassNotFoundException - if servlet class can't be found. exception: ServletException - if servlet can't be initialized. |
notifyUnload | public void notifyUnload()(Code) | | |
setValue | public void setValue(int idx, Object value)(Code) | | Catch assignements to the servlet class name attribute.
When a change to that attribute is detected, the servlet is
automatically reinitialized.
|
setValueOfSuperClass | protected void setValueOfSuperClass(int idx, Object value)(Code) | | |
Methods inherited from org.w3c.tools.resources.FramedResource | public void addAttributeChangedListener(AttributeChangedListener l)(Code)(Java Doc) public void addStructureChangedListener(StructureChangedListener l)(Code)(Java Doc) public synchronized ResourceReference[] collectFramesReference(Class c)(Code)(Java Doc) public synchronized void delete() throws MultipleLockException(Code)(Java Doc) protected void disableEvent()(Code)(Java Doc) protected void displayEvent(FramedResource fr, EventObject evt)(Code)(Java Doc) protected void enableEvent()(Code)(Java Doc) protected boolean eventDisabled()(Code)(Java Doc) protected void fireAttributeChangeEvent(AttributeChangedEvent evt)(Code)(Java Doc) protected void fireStructureChangedEvent(int type)(Code)(Java Doc) protected void fireStructureChangedEvent(StructureChangedEvent evt)(Code)(Java Doc) public void frameAdded(FrameEvent evt)(Code)(Java Doc) public void frameModified(FrameEvent evt)(Code)(Java Doc) public void frameRemoved(FrameEvent evt)(Code)(Java Doc) public Object getClone(Object values)(Code)(Java Doc) public synchronized ResourceFrame getFrame(Class c, String identifier)(Code)(Java Doc) public synchronized ResourceFrame getFrame(String classname)(Code)(Java Doc) public synchronized ResourceReference getFrameReference(Class c)(Code)(Java Doc) public synchronized ResourceReference getFrameReference(ResourceFrame frame)(Code)(Java Doc) public synchronized ResourceReference[] getFramesReference()(Code)(Java Doc) public int getOid()(Code)(Java Doc) public void initialize(Object values)(Code)(Java Doc) public boolean lookup(LookupState ls, LookupResult lr) throws ProtocolException(Code)(Java Doc) public void markModified()(Code)(Java Doc) public void notifyUnload()(Code)(Java Doc) public ReplyInterface perform(RequestInterface request) throws ProtocolException, ResourceException(Code)(Java Doc) protected ReplyInterface performFrames(RequestInterface request) throws ProtocolException, ResourceException(Code)(Java Doc) protected void postAttributeChangeEvent(int idx, Object newvalue)(Code)(Java Doc) public void postEvent(ResourceEvent evt)(Code)(Java Doc) protected void postStructureChangedEvent(ResourceReference rr, int type)(Code)(Java Doc) protected void postStructureChangedEvent(int type)(Code)(Java Doc) public void processEvent(ResourceEvent evt)(Code)(Java Doc) public void registerFrame(ResourceFrame frame, Hashtable defs)(Code)(Java Doc) protected void registerFrameIfNone(String classname, String identifier) throws ClassNotFoundException, IllegalAccessException, InstantiationException, ClassCastException(Code)(Java Doc) public void removeAttributeChangedListener(AttributeChangedListener l)(Code)(Java Doc) public void removeStructureChangedListener(StructureChangedListener l)(Code)(Java Doc) public synchronized void setSilentValue(int idx, Object value)(Code)(Java Doc) public synchronized void setSilentValue(String name, Object value)(Code)(Java Doc) public synchronized void setValue(int idx, Object value)(Code)(Java Doc) public synchronized void unregisterFrame(ResourceFrame frame)(Code)(Java Doc)
|
Methods inherited from org.w3c.tools.resources.AttributeHolder | public boolean definesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc) public boolean definesAttribute(String name) throws IllegalAttributeAccess(Code)(Java Doc) public Attribute[] getAttributes()(Code)(Java Doc) public boolean getBoolean(int idx, boolean def)(Code)(Java Doc) public char getChar(int idx, char def)(Code)(Java Doc) public Object getClone(Object values)(Code)(Java Doc) public synchronized Object getClone()(Code)(Java Doc) public synchronized Object getClone(Hashtable defs)(Code)(Java Doc) public double getDouble(int idx, double def)(Code)(Java Doc) public float getFloat(int idx, float def)(Code)(Java Doc) public int getInt(int idx, int def)(Code)(Java Doc) public long getLong(int idx, long def)(Code)(Java Doc) public String getString(int idx, String def)(Code)(Java Doc) public synchronized Object getValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc) public Object getValue(String name, Object def) throws IllegalAttributeAccess(Code)(Java Doc) public synchronized void initialize(Object nvalues)(Code)(Java Doc) public synchronized void initialize(Hashtable defs)(Code)(Java Doc) public int lookupAttribute(String name)(Code)(Java Doc) public synchronized void pickleValues(Hashtable defs)(Code)(Java Doc) public void print(PrintStream out)(Code)(Java Doc) public void setBoolean(int idx, boolean b)(Code)(Java Doc) public void setChar(int idx, char ch) throws IllegalAttributeAccess(Code)(Java Doc) public void setDouble(int idx, double d) throws IllegalAttributeAccess(Code)(Java Doc) public void setFloat(int idx, float f) throws IllegalAttributeAccess(Code)(Java Doc) public void setInt(int idx, int i) throws IllegalAttributeAccess(Code)(Java Doc) public void setLong(int idx, long l) throws IllegalAttributeAccess(Code)(Java Doc) public void setString(int idx, String s) throws IllegalAttributeAccess(Code)(Java Doc) public synchronized void setValue(int idx, Object value)(Code)(Java Doc) public void setValue(String name, Object value)(Code)(Java Doc) public boolean unsafeDefinesAttribute(int idx) throws IllegalAttributeAccess(Code)(Java Doc) public double unsafeGetDouble(int idx, double def)(Code)(Java Doc) public String unsafeGetString(int idx, String def)(Code)(Java Doc) public Object unsafeGetValue(int idx, Object def) throws IllegalAttributeAccess(Code)(Java Doc)
|
|
|