org.w3c.jigsaw.servlet
Class RemoteServletWrapper

java.lang.Object
  extended by org.w3c.tools.resources.AttributeHolder
      extended by org.w3c.tools.resources.Resource
          extended by org.w3c.tools.resources.FramedResource
              extended by org.w3c.jigsaw.servlet.ServletWrapper
                  extended by org.w3c.jigsaw.servlet.RemoteServletWrapper
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, javax.servlet.ServletConfig, FrameEventListener

public class RemoteServletWrapper
extends ServletWrapper


Nested Class Summary
 
Nested classes/interfaces inherited from class org.w3c.jigsaw.servlet.ServletWrapper
ServletWrapper.ServletRunner, ServletWrapper.TimeoutManager
 
Field Summary
protected static int ATTR_SERVLET_BASE
          Attribute index - The servlet content base.
protected  ServletLoader loader
          The ServletLoader instance for loading that servlet.
 
Fields inherited from class org.w3c.jigsaw.servlet.ServletWrapper
ATTR_PARAMETERS, ATTR_SERVLET_CLASS, ATTR_SERVLET_CONTEXT, ATTR_SERVLET_INSTANCEMAX, ATTR_SERVLET_TIMEOUT, ATTR_SESSION_CONTEXT, ENDED, inited, RUNNER, servletPool, 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, co, id
 
Fields inherited from class org.w3c.tools.resources.AttributeHolder
attributes, values
 
Constructor Summary
RemoteServletWrapper()
           
 
Method Summary
protected  void checkServlet()
          Check the servlet class, ans try to initialize it.
 java.lang.String getServletBase()
          Get the remote servlet URL base.
protected  ServletLoader getServletLoader()
          Get or create a suitable ServletLoader instance to load that servlet.
protected  boolean launchServlet()
          Initialize the servlet.
 void setValue(int idx, java.lang.Object value)
          Catch assignements to the servlet class name attribute.
 
Methods inherited from class org.w3c.jigsaw.servlet.ServletWrapper
acceptUnload, createNewLocalServletLoader, destroyServlet, getInitParameter, getInitParameterNames, getInstanceMax, getLocalServletLoader, getServlet, getServletClass, getServletContext, getServletDirectory, getServletName, getServletParameters, getServletTimeout, getSessionContext, initialize, invalidateAllSession, isInited, isServletLoaded, isWrappingAServlet, launchServlet, notifyUnload, service, setValueOfSuperClass
 
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, setSilentValue, setSilentValue, 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, initialize, isInitialized, isUnloaded, pickleValues, setContext, setContext, setValue, unsafeGetContext, unsafeGetFrame, unsafeGetFrames, unsafeGetIdentifier, unsafeGetResourceReference, unsafeGetURLPath, unsafeGetValue, updateAttributes
 
Methods inherited from class org.w3c.tools.resources.AttributeHolder
definesAttribute, definesAttribute, getAttributes, getBoolean, getChar, getClone, getClone, getDouble, getFloat, getInt, getLong, getString, getValue, lookupAttribute, print, setBoolean, setChar, setDouble, setFloat, setInt, setLong, setString, setValue, unsafeDefinesAttribute, unsafeGetDouble, unsafeGetString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_SERVLET_BASE

protected static int ATTR_SERVLET_BASE
Attribute index - The servlet content base.


loader

protected ServletLoader loader
The ServletLoader instance for loading that servlet.

Constructor Detail

RemoteServletWrapper

public RemoteServletWrapper()
Method Detail

checkServlet

protected void checkServlet()
                     throws java.lang.ClassNotFoundException,
                            javax.servlet.ServletException
Check the servlet class, ans try to initialize it.

Overrides:
checkServlet in class ServletWrapper
Throws:
java.lang.ClassNotFoundException - if servlet class can't be found.
javax.servlet.ServletException - if servlet can't be initialized.

getServletLoader

protected ServletLoader getServletLoader()
Get or create a suitable ServletLoader instance to load that servlet.

Returns:
A ServletLoader instance.

getServletBase

public java.lang.String getServletBase()
Get the remote servlet URL base.

Returns:
The String encoded base URL for that servlet, or null if undefined.

setValue

public void setValue(int idx,
                     java.lang.Object value)
Description copied from class: ServletWrapper
Catch assignements to the servlet class name attribute.

When a change to that attribute is detected, the servlet is automatically reinitialized.

Overrides:
setValue in class ServletWrapper
Parameters:
idx - The index of the attribute to modify.
value - The new attribute value.

launchServlet

protected boolean launchServlet()
                         throws java.lang.ClassNotFoundException,
                                javax.servlet.ServletException
Initialize the servlet.

Overrides:
launchServlet in class ServletWrapper
Returns:
A boolean, true if servlet launched.
Throws:
java.lang.ClassNotFoundException - if servlet class can't be found.
javax.servlet.ServletException - if servlet can't be initialized.