com.creamtec.ajaxswing.servlet
Class AppDesc

java.lang.Object
  extended by com.creamtec.ajaxswing.servlet.AppDescBase
      extended by com.creamtec.ajaxswing.servlet.AppDesc
All Implemented Interfaces:
SessionListener
Direct Known Subclasses:
ServletHelper.InProcessAppDesc

public abstract class AppDesc
extends com.creamtec.ajaxswing.servlet.AppDescBase
implements SessionListener

Application descriptor. It stores application configuration parameters and a collection of currently running client agents.


Field Summary
 java.util.HashMap agents
          Map of agents
 java.lang.String appName
          Application name
 boolean inProcess
          Flag indicating whether the emulation should be in the web server JVM
 java.lang.String tempDirPath
          Path to the temporary directory
 
Fields inherited from class com.creamtec.ajaxswing.servlet.AppDescBase
APPS_LIMIT, CONNECTIONS_LIMIT, dummy1, dummy2, evalRequests, licInitialized
 
Constructor Summary
AppDesc(java.lang.String appName)
          Initializes application
 
Method Summary
 void addAgent(java.lang.Object session, ClientAgentRemote agent)
          Adds the given agent to the list of currently running agents.
 ClientAgentRemote getAgent(java.lang.Object session)
          Returns the agent associated with the given session
 java.util.Iterator getAgents()
          Returns an iterator of client agents
 int getAgentsCount()
          Returns the number of agents currently running for this application
 java.lang.String getAppName()
          Returns the application name.
 AppProperties getProps()
          Returns application configuration properties.
 java.lang.Object getSession(ClientAgentRemote agent)
          Returns the session associated with the given agent
 SessionManager getSessionManager()
          Returns application session manager.
 java.lang.String getTempDirPath()
          Returns the path of the temporary directory on the web server Documents placed in this directory can be referenced from generated HTML pages
 boolean isInProcess()
          Returns true if the application is configured to run inside the same JVM as the router.
 void removeAgent(java.lang.Object session)
          Removes the agent identified by the given session
 
Methods inherited from class com.creamtec.ajaxswing.servlet.AppDescBase
initLicense
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.creamtec.ajaxswing.servlet.SessionListener
sessionExpired
 

Field Detail

appName

public java.lang.String appName
Application name


inProcess

public boolean inProcess
Flag indicating whether the emulation should be in the web server JVM


tempDirPath

public java.lang.String tempDirPath
Path to the temporary directory


agents

public java.util.HashMap agents
Map of agents

Constructor Detail

AppDesc

public AppDesc(java.lang.String appName)
        throws java.lang.Exception
Initializes application

Parameters:
appName - String
Throws:
java.lang.Exception
Method Detail

isInProcess

public boolean isInProcess()
Returns true if the application is configured to run inside the same JVM as the router.

Returns:
boolean

getProps

public AppProperties getProps()
Returns application configuration properties.

Returns:
AppProperties

getSessionManager

public SessionManager getSessionManager()
Returns application session manager.

Returns:
SessionManager

addAgent

public void addAgent(java.lang.Object session,
                     ClientAgentRemote agent)
              throws AjaxSwingException
Adds the given agent to the list of currently running agents.

Parameters:
session - session key, used to identify HTTP session
agent - ClientAgentRemote
Throws:
AjaxSwingException

getAgent

public ClientAgentRemote getAgent(java.lang.Object session)
Returns the agent associated with the given session

Parameters:
session - session key
Returns:
ClientAgentRemote

getSession

public java.lang.Object getSession(ClientAgentRemote agent)
Returns the session associated with the given agent

Parameters:
agent - ClientAgentRemote
Returns:
Object

removeAgent

public void removeAgent(java.lang.Object session)
Removes the agent identified by the given session

Parameters:
session - Object

getAgents

public java.util.Iterator getAgents()
Returns an iterator of client agents

Returns:
Iterator

getAgentsCount

public int getAgentsCount()
Returns the number of agents currently running for this application

Returns:
int

getAppName

public java.lang.String getAppName()
Returns the application name. The application name is used to identify the application configuration file (name.properties).

Returns:
String

getTempDirPath

public java.lang.String getTempDirPath()
Returns the path of the temporary directory on the web server Documents placed in this directory can be referenced from generated HTML pages

Returns:
String


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