de.esprit.netsuite.server.batch

## Class ServerBatchTaskManager

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.launch.AbstractApplicationObject<S>
    - - de.esprit.netsuite.server.AbstractServerObject<ServerContext>
      - - de.esprit.netsuite.server.batch.ServerBatchTaskManager

- All Implemented Interfaces:
    ApplicationObject<ServerContext>, CloseableComponent, SimpleLogSupport, Dumpable, ServerObject<ServerContext>, java.lang.AutoCloseable

      public class ServerBatchTaskManager
      extends AbstractServerObject<ServerContext>
      implements CloseableComponent

  This class encapsulates the entries in the coservers.cfg configuration file
  Author:
    Rainer Buesch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `LOG_CLEANUP_TASK`
    `static java.lang.String` | `TEST_PROC_TASK`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerBatchTaskManager(ServerContext serverCtx)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancelCurrentProcess(SessionId sessionId)` Stops the process if it is currently running.
    `void` | `close()`
    `ServerBatchTaskConfigEntry` | `fetchProcessConfigByName(java.lang.String procName)`
    `AbstractServerBatchTask` | `fetchProcessTaskByName(java.lang.String procName)`
    `ServerBatchTaskConfigEntry[]` | `getConfigEntries()`
    `void` | `saveConfig(SessionId sessionId, ServerBatchTaskConfigEntry procCfg)`
    `void` | `scheduleTask(ServerBatchTaskConfigEntry procCfg)`
    `void` | `startBatchProcesses()`
    `AbstractServerBatchTask` | `startProcess(java.lang.String procName, SessionId sessionId)` Runs the process directly, no matter whether it is enabled or not
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.

    - ### Methods inherited from class de.esprit.netsuite.server.AbstractServerObject

      `getServerConfig, getServerContext, getServerParams, getServerStartup, getStatisticManager, toString`

    - ### Methods inherited from class de.esprit.appsuite.launch.AbstractApplicationObject

      `getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### LOG_CLEANUP_TASK

          public static final java.lang.String LOG_CLEANUP_TASK

      See Also:
        Constant Field Values

    - #### TEST_PROC_TASK

          public static final java.lang.String TEST_PROC_TASK

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ServerBatchTaskManager

          public ServerBatchTaskManager(ServerContext serverCtx)

  - ### Method Detail

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### startBatchProcesses

          public void startBatchProcesses()
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### scheduleTask

          public void scheduleTask(ServerBatchTaskConfigEntry procCfg)
                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### startProcess

          public AbstractServerBatchTask startProcess(java.lang.String procName,
                                             SessionId sessionId)
                                               throws java.lang.Exception

      Runs the process directly, no matter whether it is enabled or not
      Parameters:
        `sessionId` -
      Throws:
        `java.lang.Exception`

    - #### cancelCurrentProcess

          public void cancelCurrentProcess(SessionId sessionId)
                                    throws java.lang.Exception

      Stops the process if it is currently running.
      Throws:
        `java.lang.Exception`

    - #### fetchProcessConfigByName

          public ServerBatchTaskConfigEntry fetchProcessConfigByName(java.lang.String procName)
                                                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fetchProcessTaskByName

          public AbstractServerBatchTask fetchProcessTaskByName(java.lang.String procName)
                                                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### saveConfig

          public void saveConfig(SessionId sessionId,
                        ServerBatchTaskConfigEntry procCfg)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getConfigEntries

          public ServerBatchTaskConfigEntry[] getConfigEntries()

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2013 EsprIT-Systems. All Rights Reserved.