jason.service.crusader.javaximpl
Class ServletContextImpl

java.lang.Object
  |
  +--jason.service.crusader.javaximpl.ServletContextImpl
All Implemented Interfaces:
javax.servlet.ServletContext

public class ServletContextImpl
extends java.lang.Object
implements javax.servlet.ServletContext

This class is a concrete implementation of javax.servlet.ServletContext. It contains a GraphNode object - that serve as the container for initParameters and attributes.
Author - Sanjay"Ironluca"Dabnath Ironluca@yahoo.com
Last Modified - 29/04/2001


Field Summary
protected  GraphNode contextInfo
          Contaions the refference to the GraphNode object which in turn contains the ServletContext information for a particular context.
protected  java.lang.String contextName
          Contains the name under which this ServletContext is bound in the data graph tree.
 
Constructor Summary
ServletContextImpl()
          No args default constructor - does nothing
ServletContextImpl(java.lang.String contextName)
          The parameterised constructor retrieves a context with the given name.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
           
 java.util.Enumeration getAttributeNames()
           
 javax.servlet.ServletContext getContext(java.lang.String URLName)
           
 java.lang.String getContextName()
          Returns the context name to which this ServletContext object is bound.
 java.lang.String getInitParameter(java.lang.String initParameterName)
           
 java.util.Enumeration getInitParameterNames()
           
 int getMajorVersion()
           
 java.lang.String getMimeType(java.lang.String fileName)
           
 int getMinorVersion()
           
 javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String dispatcherName)
           
 java.lang.String getRealPath(java.lang.String vertualPath)
           
 javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String URLPath)
           
 java.net.URL getResource(java.lang.String path)
           
 java.io.InputStream getResourceAsStream(java.lang.String path)
           
 java.lang.String getServerInfo()
           
 javax.servlet.Servlet getServlet(java.lang.String servletName)
           
 java.lang.String getServletInfo()
           
 java.util.Enumeration getServletNames()
           
 java.util.Enumeration getServlets()
           
 void log(java.lang.Exception exception, java.lang.String message)
           
 void log(java.lang.String message)
           
 void log(java.lang.String message, java.lang.Throwable throwable)
           
 void removeAttribute(java.lang.String attributeName)
           
 void setAttribute(java.lang.String attributeName, java.lang.Object attributeValue)
           
 void setContextName(java.lang.String contextName)
          This method sets the context name for this ServletContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contextName

protected java.lang.String contextName
Contains the name under which this ServletContext is bound in the data graph tree.


contextInfo

protected GraphNode contextInfo
Contaions the refference to the GraphNode object which in turn contains the ServletContext information for a particular context.

Constructor Detail

ServletContextImpl

public ServletContextImpl()
No args default constructor - does nothing


ServletContextImpl

public ServletContextImpl(java.lang.String contextName)
The parameterised constructor retrieves a context with the given name. If the context does not exist, one is created.

Parameters:
contextName - The name of the context to retrieve.
Method Detail

getContextName

public java.lang.String getContextName()
Returns the context name to which this ServletContext object is bound.

Returns:
java.lang.String The name under which this context object is bound.

setContextName

public void setContextName(java.lang.String contextName)
This method sets the context name for this ServletContext. If a different context name is set - the internal GraphNode is changed to point to the new node in the data graph tree.


getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)
Specified by:
getAttribute in interface javax.servlet.ServletContext

getAttributeNames

public java.util.Enumeration getAttributeNames()
Specified by:
getAttributeNames in interface javax.servlet.ServletContext

getContext

public javax.servlet.ServletContext getContext(java.lang.String URLName)
Specified by:
getContext in interface javax.servlet.ServletContext

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface javax.servlet.ServletContext

getMimeType

public java.lang.String getMimeType(java.lang.String fileName)
Specified by:
getMimeType in interface javax.servlet.ServletContext

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface javax.servlet.ServletContext

getRealPath

public java.lang.String getRealPath(java.lang.String vertualPath)
Specified by:
getRealPath in interface javax.servlet.ServletContext

getRequestDispatcher

public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String URLPath)
Specified by:
getRequestDispatcher in interface javax.servlet.ServletContext

getResource

public java.net.URL getResource(java.lang.String path)
Specified by:
getResource in interface javax.servlet.ServletContext

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String path)
Specified by:
getResourceAsStream in interface javax.servlet.ServletContext

getServletInfo

public java.lang.String getServletInfo()

log

public void log(java.lang.String message)
Specified by:
log in interface javax.servlet.ServletContext

log

public void log(java.lang.String message,
                java.lang.Throwable throwable)
Specified by:
log in interface javax.servlet.ServletContext

removeAttribute

public void removeAttribute(java.lang.String attributeName)
Specified by:
removeAttribute in interface javax.servlet.ServletContext

setAttribute

public void setAttribute(java.lang.String attributeName,
                         java.lang.Object attributeValue)
Specified by:
setAttribute in interface javax.servlet.ServletContext

getServlet

public javax.servlet.Servlet getServlet(java.lang.String servletName)
Specified by:
getServlet in interface javax.servlet.ServletContext

getServlets

public java.util.Enumeration getServlets()
Specified by:
getServlets in interface javax.servlet.ServletContext

getServletNames

public java.util.Enumeration getServletNames()
Specified by:
getServletNames in interface javax.servlet.ServletContext

log

public void log(java.lang.Exception exception,
                java.lang.String message)
Specified by:
log in interface javax.servlet.ServletContext

getServerInfo

public java.lang.String getServerInfo()
Specified by:
getServerInfo in interface javax.servlet.ServletContext

getNamedDispatcher

public javax.servlet.RequestDispatcher getNamedDispatcher(java.lang.String dispatcherName)
Specified by:
getNamedDispatcher in interface javax.servlet.ServletContext

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Specified by:
getInitParameterNames in interface javax.servlet.ServletContext

getInitParameter

public java.lang.String getInitParameter(java.lang.String initParameterName)
Specified by:
getInitParameter in interface javax.servlet.ServletContext