org.millstone.webadapter
Class WebAdapterServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.millstone.webadapter.WebAdapterServlet
All Implemented Interfaces:
Application.WindowAttachListener, Application.WindowDetachListener, Paintable.RepaintRequestListener, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class WebAdapterServlet
extends javax.servlet.http.HttpServlet
implements Application.WindowAttachListener, Application.WindowDetachListener, Paintable.RepaintRequestListener

This servlet is the core of the MillStone Web Adapter, that adapts the MillStone applications to Web standards. The web adapter can be used to represent the most MillStone application using Web browsers and corresponding technologies.

Since:
3.0
Version:
3.0.3
Author:
IT Mill Ltd.
See Also:
Serialized Form

Constructor Summary
WebAdapterServlet()
           
 
Method Summary
protected  void addDirtyWindow(Application application, Window window)
           
protected  java.util.Set getDirtyWindows(Application app)
          Get the list of dirty windows in application
 java.lang.String getResourceLocation(java.lang.String theme, ThemeResource resource)
          Get relative location of a theme resource.
 ThemeSource getThemeSource()
          Returns the theme source.
 void init(javax.servlet.ServletConfig servletConfig)
          Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
 boolean isDebugMode()
          Check if web adapter is in debug mode.
protected  void removeDirtyWindow(Application application, Window window)
           
 void repaintRequested(Paintable.RepaintRequestEvent event)
          Receive repaint request events.
protected  void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Receives standard HTTP requests from the public service method and dispatches them.
 void windowAttached(org.millstone.base.Application.WindowAttachEvent event)
          Window attached
 void windowDetached(org.millstone.base.Application.WindowDetachEvent event)
          Window attached
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebAdapterServlet

public WebAdapterServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Called by the servlet container to indicate to a servlet that the servlet is being placed into service.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
servletConfig - object containing the servlet's configuration and initialization parameters
Throws:
javax.servlet.ServletException - if an exception has occurred that interferes with the servlet's normal operation.

service

protected void service(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws javax.servlet.ServletException,
                       java.io.IOException
Receives standard HTTP requests from the public service method and dispatches them.

Overrides:
service in class javax.servlet.http.HttpServlet
Parameters:
request - object that contains the request the client made of the servlet
response - object that contains the response the servlet returns to the client
Throws:
javax.servlet.ServletException - if an input or output error occurs while the servlet is handling the TRACE request
java.io.IOException - if the request for the TRACE cannot be handled

getResourceLocation

public java.lang.String getResourceLocation(java.lang.String theme,
                                            ThemeResource resource)
Get relative location of a theme resource.

Parameters:
theme - Theme name
resource - Theme resource
Returns:
External URI specifying the resource

isDebugMode

public boolean isDebugMode()
Check if web adapter is in debug mode. Extra output is generated to log when debug mode is enabled.

Returns:
Debug mode

getThemeSource

public ThemeSource getThemeSource()
Returns the theme source.

Returns:
ThemeSource

addDirtyWindow

protected void addDirtyWindow(Application application,
                              Window window)

removeDirtyWindow

protected void removeDirtyWindow(Application application,
                                 Window window)

windowAttached

public void windowAttached(org.millstone.base.Application.WindowAttachEvent event)
Description copied from interface: Application.WindowAttachListener
Window attached

Specified by:
windowAttached in interface Application.WindowAttachListener
See Also:
Application.WindowAttachListener.windowAttached(Application.WindowAttachEvent)

windowDetached

public void windowDetached(org.millstone.base.Application.WindowDetachEvent event)
Description copied from interface: Application.WindowDetachListener
Window attached

Specified by:
windowDetached in interface Application.WindowDetachListener
See Also:
Application.WindowDetachListener.windowDetached(Application.WindowDetachEvent)

repaintRequested

public void repaintRequested(Paintable.RepaintRequestEvent event)
Description copied from interface: Paintable.RepaintRequestListener
Receive repaint request events.

Specified by:
repaintRequested in interface Paintable.RepaintRequestListener
Parameters:
event - The repaint request event specifying the paintable source.
See Also:
Paintable.RepaintRequestListener.repaintRequested(Paintable.RepaintRequestEvent)

getDirtyWindows

protected java.util.Set getDirtyWindows(Application app)
Get the list of dirty windows in application



Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.