org.demac.j2me.DEMAC
Class DemacHighLevelAPI

java.lang.Object
  extended by org.demac.j2me.DEMAC.DemacHighLevelAPI

public class DemacHighLevelAPI
extends java.lang.Object


Method Summary
static DemacHighLevelAPI getDemacHighLevelAPI()
          Method to return the instance of the DemacHighLevelAPI singleton.
 boolean isStarted()
          Method to indicate if DEMAC is running.
 java.lang.String runManagedProcess(byte[] dpdlprocess, byte[] managementdesriptor)
          Method to pass over a process and its respective management descriptor to be run on the DEMAC process service.
 java.lang.String runProcess(byte[] dpdlprocess)
          Method to pass over a process to be run on the DEMAC process service.
 java.lang.String runProcess(byte[] dpdlprocess, java.util.Hashtable extensions)
          Method to pass over a process to be run on the DEMAC process service.
 void startDefaultDemac()
          Method to start the DEMAC middleware with a default configuration of internal services.
 void startDemacDesktopGUI()
          Method to start the DEMAC middleware with a default configuration of internal services.
 void stopDemac()
          Method to stop the DEMAC middleware and shut down all of its services.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDemacHighLevelAPI

public static DemacHighLevelAPI getDemacHighLevelAPI()
Method to return the instance of the DemacHighLevelAPI singleton.

Returns:
DemacHighLevelAPI instance

startDemacDesktopGUI

public void startDemacDesktopGUI()
                          throws java.lang.Exception
Method to start the DEMAC middleware with a default configuration of internal services. Use this method to start DEMAC with its Desktop GUI to pass processes manually or to configure DEMAC manually.

Throws:
java.lang.Exception

startDefaultDemac

public void startDefaultDemac()
                       throws java.lang.Exception
Method to start the DEMAC middleware with a default configuration of internal services. Use this method to start DEMAC from an application which passes processes automatically and which does not want to provide the DEMAC Desktop GUI.

Throws:
java.lang.Exception

stopDemac

public void stopDemac()
               throws java.lang.Exception
Method to stop the DEMAC middleware and shut down all of its services.

Throws:
java.lang.Exception

runProcess

public java.lang.String runProcess(byte[] dpdlprocess)
                            throws java.lang.Exception
Method to pass over a process to be run on the DEMAC process service. The process has to be in XML format following the DPDL schema, otherwise this invocation will produce an exception. If the process engine is not busy, the process will be processed immediately.

Parameters:
dpdlprocess - The process in XML format following the DPDL schema
Returns:
a universally unique identifier (UUID) which overrides the identifier this process instance and can be used to track the process
Throws:
StorageException - if the process cannot be stored.
java.lang.Exception

runProcess

public java.lang.String runProcess(byte[] dpdlprocess,
                                   java.util.Hashtable extensions)
                            throws java.lang.Exception
Method to pass over a process to be run on the DEMAC process service. The process has to be in XML format following the DPDL schema, otherwise this invocation will produce an exception. If the process engine is not busy, the process will be processed immediately.

Parameters:
dpdlprocess - The process in XML format following the DPDL schema
extensions - Extensions such as dataclasses for parallel processing
Returns:
a universally unique identifier (UUID) which overrides the identifier this process instance and can be used to track the process
Throws:
StorageException - if the process cannot be stored.
java.lang.Exception

runManagedProcess

public java.lang.String runManagedProcess(byte[] dpdlprocess,
                                          byte[] managementdesriptor)
                                   throws java.lang.Exception
Method to pass over a process and its respective management descriptor to be run on the DEMAC process service. The process has to be in XML format following the DPDL schema, otherwise this invocation will produce an exception. If the process engine is not busy, the process will be processed immediately. The management descriptor has to be in XML format and following the management schema

Parameters:
dpdlprocess - The process in XML format following the DPDL schema
managementdesriptor - The process in XML format following the DPDL schema
Returns:
a universally unique identifier (UUID) which overrides the identifier this process instance and can be used to track the process
Throws:
StorageException - if the process cannot be stored.
java.lang.Exception

isStarted

public boolean isStarted()
Method to indicate if DEMAC is running. If at least one DEMAC middleware service is started, it returns true

Returns:
true, if DEMAC is started