Class ProcessLoader

java.lang.Object
org.vast.sensorML.ProcessLoader
All Implemented Interfaces:
IProcessFactory

public class ProcessLoader extends Object implements IProcessFactory

Implementation of process factory looking up mapping from URI to actual implementation class from an XML mapping file.

Since:
Feb 15, 2006
  • Constructor Details

    • ProcessLoader

      public ProcessLoader()
  • Method Details

    • loadProcess

      public IProcessExec loadProcess(String uri) throws ProcessException
      Description copied from interface: IProcessFactory
      Loads the executable process implementation corresponding to the given URI.
      Specified by:
      loadProcess in interface IProcessFactory
      Parameters:
      uri - URI of the method (i.e. the specific process to instantiate)
      Returns:
      the newly created process object
      Throws:
      ProcessException - if the process cannot be instantiated (e.g. unknown URI)
    • reloadMaps

      public static void reloadMaps(String libFileUrl) throws SMLException
      Reloads the URI to Process Class map using the provided XML file completely erases previous table.
      Parameters:
      libFileUrl - Url to the file containing the mapping definitions
      Throws:
      SMLException
    • loadMaps

      public static void loadMaps(String libFileUrl, boolean replace) throws SMLException
      Loads the URI to Process Class map using the provided XML file. Existing entries are replaced only if the replace argument is true.
      Parameters:
      libFileUrl - Url to the file containing the mapping definitions
      replace - If true, existing entries are replaced
      Throws:
      SMLException