Class ScheduleModifier

java.lang.Object
quadbase.scheduler.ScheduleModifier

public class ScheduleModifier extends Object
Contains static API methods to manage tasks in the scheduler. A typical use of this class involves the following:

 
      // first connect to Espress Manager
      ScheduleModifier.connectServer(null);
 
      // allocate the ScheduleObject
 ScheduleObject sObj = ...;
      // set the desired settings for this schedule task
 sObj.setFileLocation("Templates/SAMPLE.rpt");
      // ...
      // add the task (ScheduleObject) to the scheduler
 ScheduleModifier.addScheduleTask(sObj);
 
 
  • Constructor Details

    • ScheduleModifier

      public ScheduleModifier()
  • Method Details

    • connectServer

      public static void connectServer(Object object)
      Connects to server
      Parameters:
      object - can be null, applet or frame
    • setServerAddress

      public static void setServerAddress(String address) throws UnknownHostException
      Sets the server address of EspressManager. Use this address instead of the one provided in the espressmanager.cfg file. It also eliminates the need of the espressmanager.cfg file in the working directory.
      Throws:
      UnknownHostException
    • setServerPortNumber

      public static void setServerPortNumber(int port)
      Sets the port number of EspressManager. Use this port number instead of the one provided in the espressmanager.cfg file. It also eliminates the need of the espressmanager.cfg file in the working directory.
    • setServerHosts

      public static void setServerHosts(Vector<String> hostnames)
      Sets the list of host names for EspressManager when tunneling is used. Use these hosts along with the ones provided in the espressmanager.cfg file. If the espressmanager.cfg file is not present, then only these hosts will be used.
    • setServletRunner

      public static void setServletRunner(String comm_url)
      Sets servlet runner hostname and port number
      Parameters:
      comm_url - servlet runner hostname and port number
    • useServlet

      public static void useServlet(boolean b)
      Determines whether to use SOCKET or HTTP or SERVLET for chart server connection
      Parameters:
      b - If true use SERVLET connection, otherwise use other connection The default value is false.
    • getServletContext

      public static String getServletContext()
      Returns servlet context
    • setServletContext

      public static void setServletContext(String context)
      Sets servlet context
    • getScheduleList

      public static Vector<ScheduleObject> getScheduleList() throws Exception
      Returns Vector of ScheduleObject which are waiting to export
      Throws:
      Exception
    • getScheduleList

      public static Vector<ScheduleObject> getScheduleList(String searchTips) throws Exception
      Returns Vector of ScheduleObject which are waiting to export and contains the searchTips in either export location or schedule job name
      Throws:
      Exception
    • modifyScheduleTask

      public static void modifyScheduleTask(ScheduleObject schObj, int idx) throws Exception
      Modifies ScheduleObject in specific index
      Parameters:
      schObj - new ScheduleObject
      Throws:
      Exception
    • addScheduleTask

      public static void addScheduleTask(ScheduleObject schObj) throws Exception
      Adds Schedule Task into Scheduler
      Parameters:
      schObj - new ScheduleObject
      Throws:
      Exception
    • removeScheduleTask

      public static void removeScheduleTask(ScheduleObject schObj) throws Exception
      Removes Schedule Object from scheduler
      Parameters:
      schObj - the scheduleObject that user wants to remove
      Throws:
      Exception
    • saveScheduleTask

      public static void saveScheduleTask() throws Exception
      Asks server to write the schedule task job to file so schedule job remains when user restarts server
      Throws:
      Exception