com.creamtec.ajaxswing.rendering.html
Class HTMLClientAgent

java.lang.Object
  extended by com.creamtec.ajaxswing.core.ClientAgent
      extended by com.creamtec.ajaxswing.rendering.html.HTMLClientAgent
All Implemented Interfaces:
ClientAgentRemote, java.rmi.Remote
Direct Known Subclasses:
ServletHelper.InProcessClientAgent

public class HTMLClientAgent
extends ClientAgent


Nested Class Summary
 
Nested classes/interfaces inherited from class com.creamtec.ajaxswing.core.ClientAgent
ClientAgent.InitLock, ClientAgent.OperationLock, ClientAgent.RequestLock
 
Field Summary
 
Fields inherited from class com.creamtec.ajaxswing.core.ClientAgent
shuttingDown
 
Constructor Summary
HTMLClientAgent(java.lang.String agentName, java.lang.String appName)
           
 
Method Summary
 void emulateRequest(HttpRequestData data)
          Emulates the given request and action, as though triggered by the application user The action is executed on a separate threads, and all threads, spawned from the emulation thread are monitored for their state.
 void ping()
          Renews a lease on the agent.
 HttpResponseData processHttpRequest(HttpRequestData requestData)
          Processes HTTP request, as received by the servlet.
 HttpResponseData renderWindows(HttpRequestData data)
          Renders the current window on EventDispatch thread
 
Methods inherited from class com.creamtec.ajaxswing.core.ClientAgent
addBlockedThread, addFastSubmitHandler, addURLParamHandler, allowDownload, allowExit, beginOperation, checkAndMonitorAsynchronousUpdates, clearAllowedDownloads, doRun, endOperation, endOperation, exit, getAjaxSwingThreadGroup, getAppName, getBrowserID, getBrowserLocale, getBrowserVersion, getClassLoader, getClientId, getClipboard, getComponentProperty, getComponentUpdateManager, getCurrentInstance, getEndOperationOnModalDialog, getEventQueue, getException, getExitPage, getHTMLPage, getInitData, getMaximumWindowSize, getOperationLock, getPageRenderer, getProps, getRepaintManager, getRequestData, getRequestFilter, getRequestId, getResponseData, getScriptToAppend, getSession, getSessionTimeout, getTempFiles, getTimeZone, getTimeZoneCurrentOffset, getTimeZoneRawOffset, getTimeZoneUseDaylight, getUIManager, getUpdateBrowserInterval, getUserLocale, getWindowProperty, getWindowProperty, getWindowsForRendering, getWindowUpdater, init, initProperties, installExitTrap, installToolkit, isApplet, isBrowserIE, isBrowserNS, isDownloadAllowed, isOperationActive, isRequestActive, isRunning, isToolkitInstalled, monitorAsynchronousUpdates, monitorAsynchronousUpdates, openInNewTab, print, removeBlockedThread, removeFastSubmitHandler, removeURLParamHandler, runApp, setAllowExit, setBrowserLocale, setClientSize, setException, setExitPage, setHTMLPage, setRequestData, setResponseData, setScriptToAppend, setSessionTimeout, setUpdateBrowser, setUpdateBrowserInterval, setUserLocale, shouldUpdateBrowser, shutdown, waitForBlockedThreads
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLClientAgent

public HTMLClientAgent(java.lang.String agentName,
                       java.lang.String appName)
                throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

processHttpRequest

public HttpResponseData processHttpRequest(HttpRequestData requestData)
                                    throws java.rmi.RemoteException,
                                           java.lang.Exception
Processes HTTP request, as received by the servlet. The general algorithm is to update the currently displayed windows with the received data, emulate the action and render them as an HTML response

Returns:
HTTP response, containing HTML page to be displayed
Throws:
java.rmi.RemoteException
java.lang.Exception

ping

public void ping()
          throws java.rmi.RemoteException,
                 java.lang.Exception
Renews a lease on the agent. Used to keep warmedUp JVM running

Throws:
java.rmi.RemoteException
java.lang.Exception

renderWindows

public HttpResponseData renderWindows(HttpRequestData data)
                               throws java.lang.Exception,
                                      java.rmi.RemoteException
Renders the current window on EventDispatch thread

Parameters:
data - request data to be processed
Returns:
response data, that is used by the caller
Throws:
java.lang.Exception
java.rmi.RemoteException

emulateRequest

public void emulateRequest(HttpRequestData data)
                    throws java.lang.Throwable
Emulates the given request and action, as though triggered by the application user The action is executed on a separate threads, and all threads, spawned from the emulation thread are monitored for their state. If a blocking dialog is displayed on a thread, the thread is interrupted and the dialog is rendered, thus not blocking the request processing

Parameters:
data - request data
Throws:
java.lang.Throwable


Copyright © 2000-2009 CreamTec LLC. All Rights Reserved.