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.rmi
Interface ReportServerRMIWrapper

All Superinterfaces:
  java.rmi.Remote

    public interface ReportServerRMIWrapper

extends java.rmi.Remote

Field Summary
`static int` | `OOME`
`static java.lang.String` | `RMI_SERVER_WRAPPER` The remote object name in the rmi registry.
`static int` | `RUNNING`
`static int` | `UNKNOWN` Defines some constants to denote the status of the remote server.

Method Summary
`ExportedFileList` | `exportResult(java.lang.String userID, java.lang.String resultFileName, java.util.Properties props)` Exports a report result to RST, HTML, PDF, TEXT, Excel and PS.
`Member[]` | `getAllMembers()` Returns all members in the cluster.
`Member[]` | `getPredefinedServers()` Gets all servers predefined.
`java.util.Properties` | `getScheduledTask(java.lang.String taskID)` Gets the properties of a scheduled task by the task ID.
`java.util.Vector` | `getScheduledTasks()` Gets the scheduled tasks.
`int` | `getServerStatus()` Gets the status of the remote server.
`boolean` | `isTempResultReady(java.lang.String tempResultName)` Tests if the temporary result is ready.
`void` | `removeLargeReport(java.lang.String tempResultName, boolean isStop)` Deprecated. As of v8, No replacement.
`boolean` | `removeScheduledTask(java.lang.String taskID)` Removes a scheduled task by the task ID.
`java.lang.String` | `runReport(java.lang.String userID, java.lang.String catalog, java.lang.String report, java.util.Properties propParams)` Runs a report immediately.
`java.lang.String` | `runReportWithTimeouts(java.lang.String userID, java.lang.String catalog, java.lang.String report, java.util.Properties propParams, long timeouts)` Runs a report immediately with timeouts.
`void` | `shutdown()` Shuts down the report server.
`java.lang.String` | `submitScheduledTask(java.lang.String userID, java.util.Properties propScheduledTask)` Submits a scheduled task and returns the task ID.
`java.lang.String` | `waitTempResultReady(java.lang.String tempResultName)` Waits for the temporary result to be ready.

Field Detail

### RMI_SERVER_WRAPPER

    static final java.lang.String RMI_SERVER_WRAPPER

  The remote object name in the rmi registry.

  See Also:
    Constant Field Values

### UNKNOWN

    static final int UNKNOWN

  Defines some constants to denote the status of the remote server. `UNKNOWN` will be returned to RMI client, if the server's status cannot be known because the server's error, or network failure. `RUNNING` denotes the remote server is normally running. `OOME` denotes OOME occurred on the remote server.

  See Also:
    Constant Field Values

### RUNNING

    static final int RUNNING

See Also:
  Constant Field Values

### OOME

    static final int OOME

See Also:
  Constant Field Values

Method Detail

### shutdown

    void shutdown()
                  throws java.rmi.RemoteException

  Shuts down the report server.

  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### runReport

    java.lang.String runReport(java.lang.String userID,
                               java.lang.String catalog,
                               java.lang.String report,
                               java.util.Properties propParams)
                               throws java.rmi.RemoteException

  Runs a report immediately. After the running is over, return the temporary result name.

  Parameters:
    `userID` - the user ID.
    `catalog` - the catalog path in the report server, for example, /SunVMDemo/SunVMDemo.cat.
    `report` - the report name, for example, invoice.cls.
    `propParams` - the properties that contain `APIConst.TAG_WHERE_PORTION, APIConst.TAG_NAMED_WHERE_PORTION, APIConst.TAG_WHERE_CLAUSE, APIConst.TAG_USE_DEF_DB_USER, APIConst.TAG_USE_NEW_DB_PSWD, APIConst.TAG_DB_USER, APIConst.TAG_DB_PSWD, APIConst.TAG_JDBC_URL, APIConst.TAG_JDBC_DRIVER, APIConst.TAG_JDBC_CONNECTION_OBJECT` and the parameter values of the report.
    For each report parameter in the properties, the key is APIConst.TAG_PARAM_PREFIX + PARAMETER_NAME, the value is the value of the parameter.

              Example: Running a report with user's JDBC connection object (APIConst.TAG_JDBC_CONNECTION_OBJECT).
              //creates the java.sql.Connection object.
              java.sql.Connection myCon = java.sql.DriverManager.getConnection(dbUrl);

              //sets the parameter APIConst.TAG_JDBC_CONNECTION_OBJECT(jrs.jdbc_connection_object) to run a report.
              propParams.put(APIConst.TAG_JDBC_CONNECTION_OBJECT, myCon);

              //runs the report using this java.sql.Connection object instead of
              //the default DB settings in the catalog.
              rptServer.runReport(userID, catalog, report, propParams);

  Returns:
    the temporary result name.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### runReportWithTimeouts

    java.lang.String runReportWithTimeouts(java.lang.String userID,
                                           java.lang.String catalog,
                                           java.lang.String report,
                                           java.util.Properties propParams,
                                           long timeouts)
                                           throws java.rmi.RemoteException

  Runs a report immediately with timeouts. When timeouts is reached, this method will add the temporary result name into the Background Tasks List and return the temporary result name. After calling this method, you can use the methods `isTempResultReady(...)` and `waitTempResultReady(...)` to check/wait until the temporary result is ready.

  Parameters:
    `userID` - the user ID.
    `catalog` - the catalog path in the report server, for example, /SunVMDemo/SunVMDemo.cat.
    `report` - the report name, for example, invoice.cls.
    `propParams` - the properties that contain `APIConst.TAG_WHERE_PORTION, APIConst.TAG_NAMED_WHERE_PORTION, APIConst.TAG_WHERE_CLAUSE, APIConst.TAG_USE_DEF_DB_USER, APIConst.TAG_USE_NEW_DB_PSWD, APIConst.TAG_DB_USER, APIConst.TAG_DB_PSWD, APIConst.TAG_JDBC_URL, APIConst.TAG_JDBC_DRIVER, APIConst.TAG_JDBC_CONNECTION_OBJECT` and the parameter values of the report.
    For each report parameter in the properties, the key is `APIConst.TAG_PARAM_PREFIX + PARAMETER_NAME`, the value is the value of the parameter.

              Example: Running a report with user's JDBC connection object (APIConst.TAG_JDBC_CONNECTION_OBJECT).
              //creates the java.sql.Connection object.
              java.sql.Connection myCon = java.sql.DriverManager.getConnection(dbUrl);

              //sets the parameter APIConst.TAG_JDBC_CONNECTION_OBJECT(jrs.jdbc_connection_object) to run a report.
              propParams.put(APIConst.TAG_JDBC_CONNECTION_OBJECT, myCon);

              //runs the report using this java.sql.Connection object instead of
              //the default DB settings in the catalog.
              rptServer.runReportWithTimeouts(userID, catalog, report, propParams, jet.server.api.http.HttpUtil.getReportWaitTimeouts());

    `timeouts` - the timeouts in milliseconds.
  Returns:
    the temporary result name.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### isTempResultReady

    boolean isTempResultReady(java.lang.String tempResultName)
                              throws java.rmi.RemoteException

  Tests if the temporary result is ready.

  Parameters:
    `tempResultName` - the temporary result name.
  Returns:
    if the temporary result is ready.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### waitTempResultReady

    java.lang.String waitTempResultReady(java.lang.String tempResultName)
                                         throws java.rmi.RemoteException

  Waits for the temporary result to be ready.

  Parameters:
    `tempResultName` - the temporary result name.
  Returns:
    the error message. null if no error.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### exportResult

    ExportedFileList exportResult(java.lang.String userID,
                                  java.lang.String resultFileName,
                                  java.util.Properties props)
                                  throws java.rmi.RemoteException

  Exports a report result to RST, HTML, PDF, TEXT, Excel and PS.

  Parameters:
    `userID` - the user ID.
    `resultFileName` - the real file name of the result, for example, c:\jrserver\temp\18238181130.temp.
    `props` - the properties `APIConst.TAG_RST, APIConst.TAG_PDF, APIConst.TAG_TEXT, APIConst.TAG_EXCEL` and `APIConst.TAG_PS`. The value of these properties is true or false. The properties `APIConst.TAG_HTML` and `APIConst.TAG_RTF`. The value of these properties is the file name without path (for example: invoice and invoice.rtf).
    About properties for each result type, see the help document
    Appendix 7: Properties for scheduling reports via URL.
    ".
  Returns:
    the exported files list.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### submitScheduledTask

    java.lang.String submitScheduledTask(java.lang.String userID,
                                         java.util.Properties propScheduledTask)
                                         throws java.rmi.RemoteException

  Submits a scheduled task and returns the task ID.

  Parameters:
    `userID` - the user ID.
    `propScheduledTask` - the properties of the scheduled task. Please see the
    file
    for the instruction of the scheduled task properties.
  Returns:
    the task ID.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### getScheduledTasks

    java.util.Vector getScheduledTasks()
                                       throws java.rmi.RemoteException

  Gets the scheduled tasks.

  Returns:
    the scheduled tasks. The `Vector` contains `Properties` objects. Each `Properties` object includes the properties of a scheduled task.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### getScheduledTask

    java.util.Properties getScheduledTask(java.lang.String taskID)
                                          throws java.rmi.RemoteException

  Gets the properties of a scheduled task by the task ID.

  Parameters:
    `taskID` - the task ID.
  Returns:
    the properties of a scheduled task.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### removeScheduledTask

    boolean removeScheduledTask(java.lang.String taskID)
                                throws java.rmi.RemoteException

  Removes a scheduled task by the task ID.

  Parameters:
    `taskID` - the task ID.
  Returns:
    if the scheduled task is removed.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### removeLargeReport

    void removeLargeReport(java.lang.String tempResultName,
                           boolean isStop)
                           throws java.rmi.RemoteException

  Deprecated. As of v8, No replacement.

  Removes the large report record of the temporary result.

  Parameters:
    `tempResultName` - the temporary result name.
    `isStop` - whether to stop the running large reports.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### getPredefinedServers

    Member[] getPredefinedServers()
                                  throws java.rmi.RemoteException

  Gets all servers predefined.

  Returns:
    a member array that represents all servers in the predefined server list, or return null only if the report server is not an admin server in the cluster.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### getAllMembers

    Member[] getAllMembers()
                           throws java.rmi.RemoteException

  Returns all members in the cluster.

  Returns:
    all members in the cluster, or return null if the report server does not have the cluster feature.
  Throws:
    `java.rmi.RemoteException` - if communication-related error occurs during RMI call execution.

### getServerStatus

    int getServerStatus()
                        throws java.rmi.RemoteException

  Gets the status of the remote server.

  Returns:
    the status integer value of the remote server.
  Throws:
    `RemoteException,` - if communication-related error occurs during RMI call execution.
    `java.rmi.RemoteException`

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