org.norther.tammi.spray.servlet
Interface ServletEngine

All Superinterfaces:
ContentFilter, Filter, Startable, TerminationFilter
All Known Implementing Classes:
DefaultServletEngine

public interface ServletEngine
extends ContentFilter, TerminationFilter, Startable

An interface to servlet engines.

Version:
$Id: ServletEngine.java,v 1.8 2009/09/28 15:08:27 cvsimp Exp $
Author:
Ilkka Priha

Method Summary
 void addListener(String className)
          Adds a new listener.
 void clearListeners()
          Clears all listeners.
 void clearMappedServlets()
          Clears all mapped servlets.
 void clearPropertyFilePaths()
          Clears all property file paths.
 Set<String> configuredServletSet()
          Returns a set of servlet class names with properties.
 String[] getListeners()
          Gets the listeners.
 String getMappedServlet(String path)
          Gets the servlet mapped to the specified path.
 String getPropertyFilePath()
          Gets the property file path of the context.
 String getPropertyFilePath(String className)
          Gets the property file path of the specified servlet.
 ObjectName getSessionManagerName()
          Gets the the session manager of this engine.
 void removeListener(String className)
          Removes a listener.
 void removeMappedServlet(String path)
          Removes the servlet mapped to the specified path.
 void removePropertyFilePath(String className)
          Removes the property file path of the specified servlet.
 Set<String> servletPathSet()
          Returns a set of servlet paths mapped to servlets.
 Set<String> servletPathSet(Set<String> filter)
          Returns a filtered set of servlet paths mapped to servlets.
 void setListeners(String[] classNames)
          Sets the listeners.
 void setLoadedServlet(String path, String className)
          Sets the servlet mapped to the specified path and loaded immediately.
 void setMappedServlet(String path, String className)
          Sets the servlet mapped to the specified path.
 void setPropertyFilePath(String path)
          Sets the property file path of the context.
 void setPropertyFilePath(String className, String path)
          Sets the property file path of the specified servlet.
 void setSessionManagerName(ObjectName manager)
          Sets the session manager of this engine.
 
Methods inherited from interface org.norther.tammi.spray.media.ContentFilter
getContentPath
 
Methods inherited from interface javax.servlet.Filter
destroy, doFilter, init
 
Methods inherited from interface org.norther.tammi.core.base.Startable
isStarted, start, stop
 

Method Detail

getListeners

String[] getListeners()
Gets the listeners.

Returns:
an array of listener class names.

setListeners

void setListeners(String[] classNames)
Sets the listeners.

Parameters:
classNames - an array of listener class names.

addListener

void addListener(String className)
Adds a new listener.

Parameters:
className - the listener class name.

removeListener

void removeListener(String className)
Removes a listener.

Parameters:
className - the listener class name.

clearListeners

void clearListeners()
Clears all listeners.


getMappedServlet

String getMappedServlet(String path)
Gets the servlet mapped to the specified path.

Parameters:
path - the servlet path.
Returns:
the servlet class name or null.

setMappedServlet

void setMappedServlet(String path,
                      String className)
Sets the servlet mapped to the specified path. The path is the first component of the request path.

Parameters:
path - the servlet path.
className - the servlet class name.

removeMappedServlet

void removeMappedServlet(String path)
Removes the servlet mapped to the specified path.

Parameters:
path - the servlet path.

clearMappedServlets

void clearMappedServlets()
Clears all mapped servlets.


setLoadedServlet

void setLoadedServlet(String path,
                      String className)
Sets the servlet mapped to the specified path and loaded immediately. The path is the first component of the request path.

Parameters:
path - the servlet path.
className - the servlet class name.

servletPathSet

Set<String> servletPathSet()
Returns a set of servlet paths mapped to servlets.

Returns:
a read-only set of servlet paths.

servletPathSet

Set<String> servletPathSet(Set<String> filter)
Returns a filtered set of servlet paths mapped to servlets.

Parameters:
filter - a set paths to be filtered out.
Returns:
a filtered set of servlet paths.

getPropertyFilePath

String getPropertyFilePath()
Gets the property file path of the context.

Returns:
the property file path or null.

setPropertyFilePath

void setPropertyFilePath(String path)
Sets the property file path of the context.

Parameters:
path - the property file path.

getPropertyFilePath

String getPropertyFilePath(String className)
Gets the property file path of the specified servlet.

Parameters:
className - the servlet class name.
Returns:
the property file path or null.

setPropertyFilePath

void setPropertyFilePath(String className,
                         String path)
Sets the property file path of the specified servlet.

Parameters:
className - the servlet class name.
path - the property file path.

removePropertyFilePath

void removePropertyFilePath(String className)
Removes the property file path of the specified servlet.

Parameters:
className - the servlet class name.

clearPropertyFilePaths

void clearPropertyFilePaths()
Clears all property file paths.


configuredServletSet

Set<String> configuredServletSet()
Returns a set of servlet class names with properties.

Returns:
a read-only set of servlet class names.

getSessionManagerName

ObjectName getSessionManagerName()
Gets the the session manager of this engine.

Returns:
the object name of the session manager or a query.

setSessionManagerName

void setSessionManagerName(ObjectName manager)
Sets the session manager of this engine. If it is not set, the default one will be used.

Parameters:
manager - the object name of the session manager or a query.


Copyright © 2004 The Norther Organization. All rights reserved.