Ontimize 5.2071EN

com.ontimize.util.operation
Class AbstractRemoteOperationManager

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended bycom.ontimize.util.operation.AbstractRemoteOperationManager
All Implemented Interfaces:
java.rmi.Remote, RemoteOperationManager, java.io.Serializable
Direct Known Subclasses:
DefaultRemoteOperationManager

public class AbstractRemoteOperationManager
extends java.rmi.server.UnicastRemoteObject
implements RemoteOperationManager

Since:
5.2008
Author:
Imatia Innovation S.L
See Also:
Serialized Form

Nested Class Summary
static class AbstractRemoteOperationManager.IdentifiedGenerator
           
 class AbstractRemoteOperationManager.RemoteOperationCheckedThread
           
 
Field Summary
static boolean DEBUG
           
protected  java.util.HashMap finishedThreads
           
protected  AbstractRemoteOperationManager.IdentifiedGenerator generator
           
protected  EntityReferenceLocator locator
           
protected static java.lang.Class[] parametersClass
           
static long remoteOperationCheckedTime
           
static int runningThreadNumber
           
protected  java.util.HashMap runningThreads
           
protected  AbstractRemoteOperationManager.RemoteOperationCheckedThread thread
           
protected  java.util.ArrayList waitingList
           
protected  java.util.HashMap waitingThreads
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface com.ontimize.util.operation.RemoteOperationManager
FINISHED, RUNNING, UNKNOWN, WAITING, WAITING_REQUIRED
 
Constructor Summary
protected AbstractRemoteOperationManager(int port, EntityReferenceLocator locator)
           
 
Method Summary
 void cancel(java.lang.String token, int sessionId)
           
protected  boolean checkSessionId(int sessionId)
           
protected  void executeRemoteOperation()
           
protected  void executeRemoteOperation(java.lang.String token)
           
protected  void executeRemoteOperation(java.lang.String token, RemoteOperation rOperation)
           
 java.util.Hashtable getCurrentExecutionInformation(java.lang.String token, int sessionId)
           
 java.util.HashMap getRequired(java.lang.String token, int sessionId)
           
 java.util.Hashtable getResult(java.lang.String token, int sessionId)
           
 int getStatus(java.lang.String token, int sessionId)
           
 boolean hasRequired(java.lang.String token, int sessionId)
           
 boolean isFinished(java.lang.String token, int sessionId)
           
 java.lang.String run(java.lang.String className, java.util.HashMap parameters, int sessionId)
           
 void setRequired(java.lang.String token, java.util.HashMap required, int sessionId)
           
 
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
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

runningThreadNumber

public static int runningThreadNumber

remoteOperationCheckedTime

public static long remoteOperationCheckedTime

DEBUG

public static boolean DEBUG

parametersClass

protected static java.lang.Class[] parametersClass

waitingList

protected java.util.ArrayList waitingList

waitingThreads

protected java.util.HashMap waitingThreads

runningThreads

protected java.util.HashMap runningThreads

finishedThreads

protected java.util.HashMap finishedThreads

locator

protected EntityReferenceLocator locator

generator

protected AbstractRemoteOperationManager.IdentifiedGenerator generator

thread

protected AbstractRemoteOperationManager.RemoteOperationCheckedThread thread
Constructor Detail

AbstractRemoteOperationManager

protected AbstractRemoteOperationManager(int port,
                                         EntityReferenceLocator locator)
                                  throws java.rmi.RemoteException
Method Detail

cancel

public void cancel(java.lang.String token,
                   int sessionId)
            throws java.lang.Exception
Specified by:
cancel in interface RemoteOperationManager
Throws:
java.lang.Exception

checkSessionId

protected boolean checkSessionId(int sessionId)

getResult

public java.util.Hashtable getResult(java.lang.String token,
                                     int sessionId)
                              throws java.lang.Exception
Specified by:
getResult in interface RemoteOperationManager
Throws:
java.lang.Exception

getCurrentExecutionInformation

public java.util.Hashtable getCurrentExecutionInformation(java.lang.String token,
                                                          int sessionId)
                                                   throws java.lang.Exception
Specified by:
getCurrentExecutionInformation in interface RemoteOperationManager
Throws:
java.lang.Exception

isFinished

public boolean isFinished(java.lang.String token,
                          int sessionId)
                   throws java.lang.Exception
Specified by:
isFinished in interface RemoteOperationManager
Throws:
java.lang.Exception

executeRemoteOperation

protected void executeRemoteOperation()

executeRemoteOperation

protected void executeRemoteOperation(java.lang.String token)

executeRemoteOperation

protected void executeRemoteOperation(java.lang.String token,
                                      RemoteOperation rOperation)

run

public java.lang.String run(java.lang.String className,
                            java.util.HashMap parameters,
                            int sessionId)
                     throws java.lang.Exception
Specified by:
run in interface RemoteOperationManager
Throws:
java.lang.Exception

setRequired

public void setRequired(java.lang.String token,
                        java.util.HashMap required,
                        int sessionId)
                 throws java.lang.Exception
Specified by:
setRequired in interface RemoteOperationManager
Throws:
java.lang.Exception

getRequired

public java.util.HashMap getRequired(java.lang.String token,
                                     int sessionId)
                              throws java.lang.Exception
Specified by:
getRequired in interface RemoteOperationManager
Throws:
java.lang.Exception

hasRequired

public boolean hasRequired(java.lang.String token,
                           int sessionId)
                    throws java.lang.Exception
Specified by:
hasRequired in interface RemoteOperationManager
Throws:
java.lang.Exception

getStatus

public int getStatus(java.lang.String token,
                     int sessionId)
              throws java.lang.Exception
Specified by:
getStatus in interface RemoteOperationManager
Throws:
java.lang.Exception

Ontimize