com.creamtec.ajaxswing.core
Class ClientAgentFactory

java.lang.Object
  extended by com.creamtec.ajaxswing.core.ClientAgentFactory

public class ClientAgentFactory
extends java.lang.Object

Creates, maintains and shuts down virtual client agents. If the client agent is configured to run in a out-of-process JVM (standalone) mode, the factory will launch a new JVM when needed


Method Summary
 ClientAgentRemote createNewAgent(java.lang.String appName, java.lang.String locale)
          Creates a new agent.
static ClientAgentFactory getInstance()
          Returns the instance of the agent factory
 java.lang.Object getLock()
           
static void init(AjaxSwingServlet servletHelper)
          Static method used to pass an active instance of the servlet helper.
 void shutdown()
          Shuts down the JVM factory but not the agents.
 void shutdownAgent(ClientAgentRemote agent, java.lang.String appName)
          Shuts down the client agent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ClientAgentFactory getInstance()
Returns the instance of the agent factory

Returns:
ClientAgentFactory

init

public static void init(AjaxSwingServlet servletHelper)
                 throws java.lang.Exception
Static method used to pass an active instance of the servlet helper. This has to be done this way because some classes are loaded by the boot class loader and others but application or web app class loader.

Parameters:
servletHelper - AjaxSwingServlet
jvmFactory - JVMFactory
Throws:
java.lang.Exception

shutdown

public void shutdown()
Shuts down the JVM factory but not the agents.


createNewAgent

public ClientAgentRemote createNewAgent(java.lang.String appName,
                                        java.lang.String locale)
                                 throws java.lang.Exception
Creates a new agent. If there is a pre-initialized agent, it is used. Otherwise a new agent is created either in or out of process and returned.

Parameters:
appName - the name of the application
locale - to group JVMs by locale, null if no group by locale
Returns:
ClientAgentRemote instance of the new agent
Throws:
java.lang.Exception - on error

shutdownAgent

public void shutdownAgent(ClientAgentRemote agent,
                          java.lang.String appName)
Shuts down the client agent. This may result in JVM shutdown.

Parameters:
agent - agent
appName - name of the application

getLock

public java.lang.Object getLock()


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