creamtec.webcream
Class ClientAgentImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by creamtec.webcream.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
static int instancesCount
           
 
Constructor Summary
ClientAgentImpl(java.lang.String agentName, java.lang.String appName)
           
 
Method Summary
 void init(AgentInitData data)
          Initializes the client
 void ping()
          Renews a lease on the agent.
 HttpResponseData processHttpRequest(HttpRequestData request)
          Processes HTTP request
 HttpResponseData renderCurrentWindow(HttpRequestData request)
          Renderes the currently focused window as HTML
 void runApp(boolean wait)
          Runs the application/applet.
 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 data)
          throws java.lang.Exception,
                 java.rmi.RemoteException
Initializes the client

Specified by:
init in interface ClientAgentRemote
Throws:
java.lang.Exception
java.rmi.RemoteException

runApp

public void runApp(boolean wait)
            throws WebCreamException,
                   java.rmi.RemoteException
Runs the application/applet. Can be used to preload app classes

Specified by:
runApp in interface ClientAgentRemote
Throws:
WebCreamException
java.rmi.RemoteException

shutdown

public void shutdown()
Shutds down the agent

Specified by:
shutdown in interface ClientAgentRemote

processHttpRequest

public HttpResponseData processHttpRequest(HttpRequestData request)
                                    throws WebCreamException,
                                           java.rmi.RemoteException
Processes HTTP request

Specified by:
processHttpRequest in interface ClientAgentRemote
Returns:
HTTP response, containing HTML page to be displayed
Throws:
WebCreamException
java.rmi.RemoteException

renderCurrentWindow

public HttpResponseData renderCurrentWindow(HttpRequestData request)
                                     throws WebCreamException,
                                            java.rmi.RemoteException
Renderes the currently focused window as HTML

Specified by:
renderCurrentWindow in interface ClientAgentRemote
Returns:
HTTP response, containing HTML page to be displayed
Throws:
WebCreamException
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


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