|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.tools.resources.AttributeHolder | +--org.w3c.tools.resources.Resource | +--org.w3c.tools.resources.FramedResource | +--org.w3c.jigsaw.servlet.ServletWrapper
Inner Class Summary | |
protected class |
ServletWrapper.TimeoutManager
|
Field Summary | |
protected static int |
ATTR_PARAMETERS
Attribute index - The init parameters for that servlet. |
protected static int |
ATTR_SERVLET_CLASS
Attributes index - The servlet class name. |
protected static int |
ATTR_SERVLET_CONTEXT
Attribute index - Our parent-inherited servlet context. |
protected static int |
ATTR_SERVLET_TIMEOUT
Attributes index - The servlet timeout |
protected static int |
ATTR_SESSION_CONTEXT
Attribute index - Our parent-inherited session context. |
protected int |
connections
|
protected static boolean |
debug
|
protected boolean |
inited
Is out servler initialized ? |
static java.lang.String |
RUNNER
|
protected javax.servlet.Servlet |
servlet
The servlet wrapped within that Jigsaw resource. |
protected ServletWrapper.TimeoutManager |
timeoutManager
|
Fields inherited from class org.w3c.tools.resources.FramedResource |
ATTR_OID,
attrListener,
debugEvent,
event_disabled,
framesRef,
structListener |
Fields inherited from class org.w3c.tools.resources.Resource |
ATTR_CONTEXT,
ATTR_HELP_URL,
ATTR_IDENTIFIER,
ATTR_LAST_MODIFIED,
ATTR_PARENT,
ATTR_RESOURCE_FRAMES,
ATTR_STORE_ENTRY,
ATTR_URL |
Fields inherited from class org.w3c.tools.resources.AttributeHolder |
attributes,
values |
Constructor Summary | |
ServletWrapper()
|
Method Summary | |
boolean |
acceptUnload()
Is that resource willing to be unloaded. |
protected void |
checkServlet()
Check the servlet class, ans try to initialize it. |
protected AutoReloadServletLoader |
createNewLocalServletLoader(boolean keepold)
|
protected void |
destroyServlet()
Destroy the servlet we are wrapping. |
java.lang.String |
getInitParameter(java.lang.String string)
Servlet stub implementation - Get an init parameter value. |
java.util.Enumeration |
getInitParameterNames()
Servlet stub implementation - Get all init parameters. |
protected AutoReloadServletLoader |
getLocalServletLoader()
Get or create a suitable LocalServletLoader instance to load that servlet. |
javax.servlet.Servlet |
getServlet()
Get the servlet we are wrapping. |
java.lang.String |
getServletClass()
Get the class name of the wrapped servlet. |
javax.servlet.ServletContext |
getServletContext()
Servlet stub implementation - Get that servlet context. |
java.io.File |
getServletDirectory()
The Path where we can find the servlet class file. |
java.lang.String |
getServletName()
Returns the name of this servlet instance. |
ArrayDictionary |
getServletParameters()
Get the init parameters for our wrapped servlet. |
protected long |
getServletTimeout()
|
JigsawHttpSessionContext |
getSessionContext()
|
void |
initialize(java.lang.Object[] values)
Initialize this servlet wrapper resource. |
protected void |
invalidateAllSession()
|
protected boolean |
isInited()
|
protected boolean |
isWrappingAServlet()
Check if the Servletclass wrapped is a Servlet class without initializing it. |
protected boolean |
launchServlet()
Launch the servlet we are wrapping. |
protected boolean |
launchServlet(java.lang.Class cls)
Initialize our servlet from the given (loaded) class. |
void |
notifyUnload()
This resource is being unloaded. |
protected void |
service(Request request,
Reply reply)
|
void |
setValue(int idx,
java.lang.Object value)
Catch assignements to the servlet class name attribute. |
protected void |
setValueOfSuperClass(int idx,
java.lang.Object value)
|
Methods inherited from class org.w3c.tools.resources.Resource |
checkMultipleLock,
collectFrames,
getContext,
getFrame,
getFrames,
getHelpURL,
getHelpURL,
getIdentifier,
getLastModified,
getParent,
getResourceReference,
getServer,
getSpace,
getSpaceEntry,
getStoreEntry,
getURLPath,
getValue,
getValue,
isInitialized,
isUnloaded,
setContext,
setContext,
setValue,
updateAttributes |
Methods inherited from class org.w3c.tools.resources.AttributeHolder |
definesAttribute,
definesAttribute,
getAttributes,
getBoolean,
getChar,
getClone,
getClone,
getDouble,
getFloat,
getInt,
getLong,
getString,
getValue,
initialize,
lookupAttribute,
pickleValues,
print,
setBoolean,
setChar,
setDouble,
setFloat,
setInt,
setLong,
setString,
setValue,
unsafeGetValue |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String RUNNER
protected ServletWrapper.TimeoutManager timeoutManager
protected int connections
protected static final boolean debug
protected static int ATTR_SERVLET_CLASS
protected static int ATTR_SERVLET_TIMEOUT
protected static int ATTR_PARAMETERS
protected static int ATTR_SERVLET_CONTEXT
protected static int ATTR_SESSION_CONTEXT
protected javax.servlet.Servlet servlet
protected boolean inited
Constructor Detail |
public ServletWrapper()
Method Detail |
public java.io.File getServletDirectory()
public java.lang.String getInitParameter(java.lang.String string)
public java.util.Enumeration getInitParameterNames()
public javax.servlet.ServletContext getServletContext()
public JigsawHttpSessionContext getSessionContext()
protected long getServletTimeout()
protected void invalidateAllSession()
protected void checkServlet() throws java.lang.ClassNotFoundException, javax.servlet.ServletException
protected boolean isInited()
protected void service(Request request, Reply reply) throws javax.servlet.ServletException, java.io.IOException
public java.lang.String getServletClass()
public ArrayDictionary getServletParameters()
protected void setValueOfSuperClass(int idx, java.lang.Object value)
public void setValue(int idx, java.lang.Object value)
When a change to that attribute is detected, the servlet is automatically reinitialized.
idx
- The index of the attribute to modify.value
- The new attribute value.protected void destroyServlet()
public javax.servlet.Servlet getServlet()
protected boolean launchServlet(java.lang.Class cls) throws javax.servlet.ServletException
cls
- The servlet loaded main class.protected boolean isWrappingAServlet()
ServletIndexer
protected boolean launchServlet() throws java.lang.ClassNotFoundException, javax.servlet.ServletException
This method either succeed, or the wrapper resource itself will fail to initialize, acting as transparently as possible (in some sense).
public boolean acceptUnload()
notifyUnload
method).
Returning false should never be needed, except for very strange resources.
public void notifyUnload()
protected AutoReloadServletLoader getLocalServletLoader()
protected AutoReloadServletLoader createNewLocalServletLoader(boolean keepold)
public java.lang.String getServletName()
public void initialize(java.lang.Object[] values)
values
- The default attribute values.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |