com.creamtec.ajaxswing

## Class ClientAgentImpl

- java.lang.Object
- - java.rmi.server.RemoteObject
  - - java.rmi.server.RemoteServer
    - - java.rmi.server.UnicastRemoteObject
      - - com.creamtec.ajaxswing.ClientAgentImpl

- All Implemented Interfaces:
    ClientAgentRemote, java.io.Serializable, java.rmi.Remote, java.rmi.server.Unreferenced

      public class ClientAgentImpl
      extends java.rmi.server.UnicastRemoteObject
      implements ClientAgentRemote, java.rmi.server.Unreferenced

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `instancesCount`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientAgentImpl(java.lang.String agentName, java.lang.String appName)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `denyDownload(java.io.File file)` Remove download file from msession by file
    `void` | `denyDownload(java.lang.String downloadFileName)` Remove download file from msession by name
    `java.lang.String` | `getBrowserLocale()`
    `java.lang.String` | `getCsrfToken()`
    `java.lang.String` | `getExitPage()`
    `double` | `getFontCalibrationData(java.lang.String fontName, int fontSize, boolean isCapital)`
    `AjaxSwingProperties` | `getProps()`
    `long` | `getSessionTimeout()`
    `java.util.List` | `getTempFiles()`
    `java.util.Locale` | `getUserLocale()`
    `void` | `init(AgentInitData initData, HttpRequestData requestData)` Initializes the client
    `boolean` | `isDownloadAllowed(java.lang.String downloadFileName)` Returns true if the download of the given file name is allowed
    `void` | `ping()` Renews a lease on the agent.
    `HttpResponseData` | `processHttpRequest(HttpRequestData request)` Processes HTTP request
    `void` | `removeDownloadFileName(java.lang.String downloadFileName)` Remove download file from map waiting ready to download file
    `HttpResponseData` | `renderWindows(HttpRequestData request)` Renderes the currently focused window as HTML
    `void` | `runApp(boolean wait)` Runs the application/applet.
    `void` | `setBrowserLocale(java.lang.String browserLocale)`
    `void` | `setExitPage(java.lang.String pageName)`
    `void` | `setFontCalibrationData(java.lang.String allCalibrationData)`
    `void` | `setSessionTimeout(long seconds)`
    `void` | `setUserLocale(java.util.Locale currentLocale)`
    `void` | `shutdown()` Shutds down the agent
    `void` | `unreferenced()` Called when the Router no longer needs the Agent.

    - ### Methods inherited from class java.rmi.server.UnicastRemoteObject

      `clone, exportObject, exportObject, exportObject, unexportObject`

    - ### Methods inherited from class java.rmi.server.RemoteServer

      `getClientHost, getLog, setLog`

    - ### Methods inherited from class java.rmi.server.RemoteObject

      `equals, getRef, hashCode, toString, toStub`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### instancesCount

          public static int instancesCount

  - ### Constructor Detail

    - #### ClientAgentImpl

          public ClientAgentImpl(java.lang.String agentName,
                         java.lang.String appName)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### init

          public void init(AgentInitData initData,
                  HttpRequestData requestData)
                    throws java.lang.Exception,
                           java.rmi.RemoteException

      Initializes the client
      Specified by:
        `init` in interface `ClientAgentRemote`
      Throws:
        `java.lang.Exception`
        `java.rmi.RemoteException`

    - #### isDownloadAllowed

          public boolean isDownloadAllowed(java.lang.String downloadFileName)
                                    throws java.rmi.RemoteException

      Returns true if the download of the given file name is allowed
      Specified by:
        `isDownloadAllowed` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

    - #### removeDownloadFileName

          public void removeDownloadFileName(java.lang.String downloadFileName)

      Remove download file from map waiting ready to download file
      Specified by:
        `removeDownloadFileName` in interface `ClientAgentRemote`

    - #### denyDownload

          public void denyDownload(java.lang.String downloadFileName)

      Remove download file from msession by name
      Specified by:
        `denyDownload` in interface `ClientAgentRemote`

    - #### denyDownload

          public void denyDownload(java.io.File file)

      Remove download file from msession by file
      Specified by:
        `denyDownload` in interface `ClientAgentRemote`

    - #### runApp

          public void runApp(boolean wait)
                      throws AjaxSwingException,
                             java.rmi.RemoteException

      Runs the application/applet. Can be used to preload app classes
      Specified by:
        `runApp` in interface `ClientAgentRemote`
      Throws:
        `AjaxSwingException`
        `java.rmi.RemoteException`

    - #### shutdown

          public void shutdown()

      Shutds down the agent
      Specified by:
        `shutdown` in interface `ClientAgentRemote`

    - #### processHttpRequest

          public HttpResponseData processHttpRequest(HttpRequestData request)
                                              throws java.lang.Exception,
                                                     java.rmi.RemoteException

      Processes HTTP request
      Specified by:
        `processHttpRequest` in interface `ClientAgentRemote`
      Returns:
        HTTP response, containing HTML page to be displayed
      Throws:
        `java.lang.Exception`
        `java.rmi.RemoteException`

    - #### renderWindows

          public HttpResponseData renderWindows(HttpRequestData request)
                                         throws java.lang.Exception,
                                                java.rmi.RemoteException

      Renderes the currently focused window as HTML
      Specified by:
        `renderWindows` in interface `ClientAgentRemote`
      Returns:
        HTTP response, containing HTML page to be displayed
      Throws:
        `java.lang.Exception`
        `java.rmi.RemoteException`

    - #### unreferenced

          public void unreferenced()

      Called when the Router no longer needs the Agent. Performs a shutdown
      Specified by:
        `unreferenced` in interface `java.rmi.server.Unreferenced`

    - #### ping

          public void ping()
                    throws java.rmi.RemoteException

      Renews a lease on the agent. Used to keep warmedUp JVM running
      Specified by:
        `ping` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

    - #### getSessionTimeout

          public long getSessionTimeout()
                                 throws java.rmi.RemoteException

      Specified by:
        `getSessionTimeout` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

    - #### setSessionTimeout

          public void setSessionTimeout(long seconds)
                                 throws java.rmi.RemoteException

      Specified by:
        `setSessionTimeout` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

    - #### getExitPage

          public java.lang.String getExitPage()
                                       throws java.rmi.RemoteException

      Specified by:
        `getExitPage` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

    - #### setExitPage

          public void setExitPage(java.lang.String pageName)
                           throws java.rmi.RemoteException

      Specified by:
        `setExitPage` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

    - #### getUserLocale

          public java.util.Locale getUserLocale()

      Specified by:
        `getUserLocale` in interface `ClientAgentRemote`

    - #### getProps

          public AjaxSwingProperties getProps()

      Specified by:
        `getProps` in interface `ClientAgentRemote`

    - #### setUserLocale

          public void setUserLocale(java.util.Locale currentLocale)

      Specified by:
        `setUserLocale` in interface `ClientAgentRemote`

    - #### getBrowserLocale

          public java.lang.String getBrowserLocale()

      Specified by:
        `getBrowserLocale` in interface `ClientAgentRemote`

    - #### setBrowserLocale

          public void setBrowserLocale(java.lang.String browserLocale)

      Specified by:
        `setBrowserLocale` in interface `ClientAgentRemote`

    - #### setFontCalibrationData

          public void setFontCalibrationData(java.lang.String allCalibrationData)

      Specified by:
        `setFontCalibrationData` in interface `ClientAgentRemote`

    - #### getFontCalibrationData

          public double getFontCalibrationData(java.lang.String fontName,
                                      int fontSize,
                                      boolean isCapital)

      Specified by:
        `getFontCalibrationData` in interface `ClientAgentRemote`

    - #### getTempFiles

          public java.util.List getTempFiles()
                                      throws java.rmi.RemoteException

      Specified by:
        `getTempFiles` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

    - #### getCsrfToken

          public java.lang.String getCsrfToken()
                                        throws java.rmi.RemoteException

      Specified by:
        `getCsrfToken` in interface `ClientAgentRemote`
      Throws:
        `java.rmi.RemoteException`

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