Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api
Interface UserTask

    public interface UserTask

UserTask is an interface that is used to help you to perform customized tasks.

Method Summary
`java.lang.String` | `getErrorMsg()` Gets the error message.
`boolean` | `hasError()` Checks if error occurs during the task running process.
`void` | `initReportProperties(java.util.Properties rptProp)` Initializes the task using the provided task properties.
`void` | `initUserTaskProperties(java.util.Properties userTaskProp)` Initializes the task using the provided customer task properties.
`void` | `run()` Performances running the task.
`void` | `stopExec()` Forces the task stop executing.

Method Detail

### initReportProperties

    void initReportProperties(java.util.Properties rptProp)

  Initializes the task using the provided task properties.

  Parameters:
    `rptProp` - the properties contains the task information of a schedule. Please see the document "INSTALL_ROOT/help/server/en/userguide/apdx_sch.htm" for the instructions of the scheduled task properties. Note: the value of jrs.task_class property should be the custom task class name, which must implement this interface.

### initUserTaskProperties

    void initUserTaskProperties(java.util.Properties userTaskProp)

  Initializes the task using the provided customer task properties.

  Parameters:
    `userTaskProp` - the properties contains the customer task information of a schedule.

### run

    void run()

  Performances running the task. This method will be called when the task run. s

### stopExec

    void stopExec()

  Forces the task stop executing. This method will be called just after the task run or force the task to stop during running process.

### hasError

    boolean hasError()

  Checks if error occurs during the task running process. By calling this method, JReport Enterprise Server gets the information whether a task has been processed successfully or not. After that, server uses it as the value of the isSuccessful column of the Completed table. If task has been set to send notification after running, depending on the return value of this method, the server decides whether to send a successful notification or a fail notification to the specified E-mail address.

  Returns:
    true if there is an error, otherwise return false.

### getErrorMsg

    java.lang.String getErrorMsg()

  Gets the error message. This method will be called to get detail error information, when there is some error during the task running process.

  Returns:
    the error message.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD