jrun.servlet
Interface WebApplication

All Superinterfaces:
ConfigurableServicePartitionMBean, J2EEModuleMBean, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean, WebApplicationServiceMBean
All Known Implementing Classes:
WebApplicationService

public interface WebApplication
extends WebApplicationServiceMBean

Functional interface for the JRun Web Application Service.

Author:
Karl Moss

Fields inherited from interface jrunx.kernel.Service
INITIALIZED, STARTED, STARTING, STOPPED, STOPPING, UNINITIALIZED
 
Method Summary
 void addListener(java.lang.Object listenerObj)
          Add an event listener to the the web app.
 void addListener(java.lang.String listenerName)
          Add an event listener to the the web app.
 JRunRequestDispatcher getDispatcher(java.lang.String uri, java.lang.String queryString)
          Service a request
 FilterManager getFilterManager()
          Returns the current filter manager or null if there are no filters configured.
 java.util.Vector getHttpSessionAttributeListeners()
          Returns the list of HttpSessionAttributeListener objects or null if none
 java.util.Vector getHttpSessionListeners()
          Returns the list of HttpSessionListener objects or null if none
 Logger getLogger()
          Gets the current logger
 java.lang.String getMimeType(java.lang.String name)
          Gets the mime type for the given resource name
 jrun.servlet.RequestDispatcher getNamedDispatcher(java.lang.String servletName)
          Gets the RequestDispatcher for a named servlet
 jrun.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
          Gets the RequestDispatcher for the given resource
 Resource getResource(java.lang.String path)
          Gets a Resource at the specified relative path within the document root
 java.io.InputStream getResourceAsStream(java.lang.String path)
          Gets an InputStream for reading the relative path within the document root
 ServletEngine getServer()
          Gets the JRun server instance
 java.lang.String getServletAliasClass(java.lang.String name)
          Given a servlet alias name, return the servlet class.
 javax.servlet.ServletContext getServletContext()
          Gets the servlet context for this web application
 java.util.Vector getServletContextAttributeListeners()
          Returns the list of ServletContextAttributeListener objects or null if none
 java.util.Vector getServletContextListeners()
          Returns the list of ServletContextListener objects or null if none
 java.util.Set getServletMappings()
          Returns the current set of servlet mappings, sorted longest first
 Session getSessionService()
          Returns the current Session service
 java.lang.ClassLoader getWebappClassLoader()
           
 java.lang.Class loadClass(java.lang.String name)
          Loads the named class using the ClassLoader for the WebApplication
 jrun.servlet.Servlet loadServlet(java.lang.String servletName, java.lang.String targetName)
          Loads the servlet using the ClassLoader for the WebApplication
 
Methods inherited from interface jrun.servlet.WebApplicationServiceMBean
getCompile, getDescription, getDirectoryBrowsing, getDisplayName, getDocumentRoot, getFileServing, getReload, getServletCheckInterval, getServletEngine, getSessionPersistence, getSessionReplication, getSessionReplicationBuddies, getWebApplication, getWebAppMetaData, getWebAppName, getWebAppRoot, getWholeContextPath, persistJRunWebXML, persistWebXML, setCompile, setContextPath, setDirectoryBrowsing, setDocumentRoot, setFileServing, setReload, setServletCheckInterval, setServletMapping, setSessionPersistence, setSessionReplication, setSessionReplicationBuddies, setWebAppName, setWebAppRoot, setWholeContextPath
 
Methods inherited from interface jrunx.kernel.ConfigurableServicePartitionMBean
setChildElements
 
Methods inherited from interface jrunx.kernel.ServicePartitionMBean
addService, addService, iterator, removeService, removeService
 
Methods inherited from interface jrunx.kernel.ServiceMBean
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind
 
Methods inherited from interface jrunx.kernel.Service
destroy, getStatus, init, start, stop, updateStatus
 
Methods inherited from interface jrun.j2ee.J2EEModuleMBean
getDeploymentOrigin, isRunning, setDeploymentOrigin
 

Method Detail

getDispatcher

public JRunRequestDispatcher getDispatcher(java.lang.String uri,
                                           java.lang.String queryString)
Service a request
Parameters:
request - The JRunRequest wrapper
conn - The ServletConnection data goes back to

getServletMappings

public java.util.Set getServletMappings()
Returns the current set of servlet mappings, sorted longest first
Returns:
The current servlet mappings

getServletAliasClass

public java.lang.String getServletAliasClass(java.lang.String name)
Given a servlet alias name, return the servlet class.
Parameters:
name - The servlet alias name
Returns:
The servlet class, or null if not found (or not a servlet)

getResource

public Resource getResource(java.lang.String path)
Gets a Resource at the specified relative path within the document root
Parameters:
path - The relative path
Returns:
The Resource that represents the path, or null if not found or not available

getResourceAsStream

public java.io.InputStream getResourceAsStream(java.lang.String path)
                                        throws java.io.IOException
Gets an InputStream for reading the relative path within the document root
Parameters:
path - The relative path
Returns:
The InputStream for reading the resource, or null if not found or not available

getRequestDispatcher

public jrun.servlet.RequestDispatcher getRequestDispatcher(java.lang.String path)
Gets the RequestDispatcher for the given resource
Parameters:
path - The resource path
Returns:
The RequestDispatcher, or null for none

getNamedDispatcher

public jrun.servlet.RequestDispatcher getNamedDispatcher(java.lang.String servletName)
Gets the RequestDispatcher for a named servlet
Parameters:
servletName - The servlet name
Returns:
The RequestDispatcher, or null for none

getLogger

public Logger getLogger()
Gets the current logger
Specified by:
getLogger in interface ServiceMBean
Returns:
The logger

loadClass

public java.lang.Class loadClass(java.lang.String name)
Loads the named class using the ClassLoader for the WebApplication
Parameters:
className - The class name
Returns:
The loaded class, or null if the class could not be loaded

getServletContext

public javax.servlet.ServletContext getServletContext()
Gets the servlet context for this web application
Returns:
The servlet context

loadServlet

public jrun.servlet.Servlet loadServlet(java.lang.String servletName,
                                        java.lang.String targetName)
                                 throws java.io.IOException,
                                        javax.servlet.ServletException
Loads the servlet using the ClassLoader for the WebApplication
Parameters:
servletName - The servlet name. This may be an alias name.
Returns:
The loaded/initialized servlet or null if the servlet was not found.

getServer

public ServletEngine getServer()
Gets the JRun server instance
Returns:
The JRun server

getMimeType

public java.lang.String getMimeType(java.lang.String name)
Gets the mime type for the given resource name
Parameters:
name - The resource name
Returns:
The mime type, or null if not found

getSessionService

public Session getSessionService()
Returns the current Session service
Returns:
The Session service

getServletContextListeners

public java.util.Vector getServletContextListeners()
Returns the list of ServletContextListener objects or null if none

getServletContextAttributeListeners

public java.util.Vector getServletContextAttributeListeners()
Returns the list of ServletContextAttributeListener objects or null if none

getHttpSessionListeners

public java.util.Vector getHttpSessionListeners()
Returns the list of HttpSessionListener objects or null if none

getHttpSessionAttributeListeners

public java.util.Vector getHttpSessionAttributeListeners()
Returns the list of HttpSessionAttributeListener objects or null if none

getFilterManager

public FilterManager getFilterManager()
Returns the current filter manager or null if there are no filters configured.

addListener

public void addListener(java.lang.String listenerName)
Add an event listener to the the web app.

addListener

public void addListener(java.lang.Object listenerObj)
Add an event listener to the the web app.

getWebappClassLoader

public java.lang.ClassLoader getWebappClassLoader()


Copyright � 2002 Macromedia Corporation. All Rights Reserved.