|
|||||||||
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 static boolean |
debug
|
protected boolean |
inited
Is out servler initialized ? |
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,
slowpickle,
values |
Constructor Summary | |
ServletWrapper()
|
Method Summary | |
boolean |
acceptUnload()
|
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. |
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()
|
protected void |
service(org.w3c.jigsaw.http.Request request,
org.w3c.jigsaw.http.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.FramedResource |
addAttributeChangedListener,
addStructureChangedListener,
collectFramesReference,
delete,
disableEvent,
displayEvent,
enableEvent,
eventDisabled,
fireAttributeChangeEvent,
fireStructureChangedEvent,
fireStructureChangedEvent,
frameAdded,
frameModified,
frameRemoved,
getClone,
getFrame,
getFrame,
getFrameReference,
getFrameReference,
getFramesReference,
getOid,
lookup,
markModified,
perform,
performFrames,
postAttributeChangeEvent,
postEvent,
postStructureChangedEvent,
postStructureChangedEvent,
processEvent,
registerFrame,
registerFrameIfNone,
removeAttributeChangedListener,
removeStructureChangedListener,
unregisterFrame |
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,
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,
pickle,
print,
setBoolean,
setChar,
setDouble,
setFloat,
setInt,
setLong,
setString,
setValue,
unpickle,
unpickle,
unpickle,
unpickleInstance,
unpickleInstance |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected ServletWrapper.TimeoutManager timeoutManager
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(org.w3c.jigsaw.http.Request request, org.w3c.jigsaw.http.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.
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()
public void notifyUnload()
protected AutoReloadServletLoader getLocalServletLoader()
protected AutoReloadServletLoader createNewLocalServletLoader(boolean keepold)
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 |