|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ReportServerRMIWrapper
| Field Summary | |
|---|---|
static int |
OOME
|
static java.lang.String |
RMI_SERVER_WRAPPER
The remote object name in rmi registry. |
static int |
RUNNING
|
static int |
UNKNOWN
Define some constants to denote the status of remote server. |
| Method Summary | |
|---|---|
ExportedFileList |
exportResult(java.lang.String userID,
java.lang.String resultFileName,
java.util.Properties props)
Export a report result to RST, HTML, PDF, TEXT, Excel and PS. |
Member[] |
getAllMembers()
Returns all members in cluster. |
Member[] |
getPredefinedServers()
Get all server list that predefined. |
java.util.Properties |
getScheduledTask(java.lang.String taskID)
Get properties of a scheduled task through the task ID. |
java.util.Vector |
getScheduledTasks()
Get scheduled tasks. |
int |
getServerStatus()
Get the status of remote server. |
boolean |
isTempResultReady(java.lang.String tempResultName)
Test if the temporary result is ready. |
void |
removeLargeReport(java.lang.String tempResultName,
boolean isStop)
Remove the large report record of the temporary result. |
boolean |
removeScheduledTask(java.lang.String taskID)
Remove a scheduled task through the task ID. |
java.lang.String |
runReport(java.lang.String userID,
java.lang.String catalog,
java.lang.String report,
java.util.Properties propParams)
Run 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)
Run a report immediately with timeouts. |
void |
shutdown()
Shutdown the RptServer. |
java.lang.String |
submitScheduledTask(java.lang.String userID,
java.util.Properties propScheduledTask)
Submit a scheduled task and return the task ID. |
java.lang.String |
waitTempResultReady(java.lang.String tempResultName)
Wait the temporary result to be ready and return the error message. |
| Field Detail |
|---|
static final java.lang.String RMI_SERVER_WRAPPER
static final int UNKNOWN
UNKNOWN will be returned RMI client, if can't get know of server's status
because server's error, or network failure.
RUNNING denote remote server is normally running.
OOME denote OOME occurred on remote server.
static final int RUNNING
static final int OOME
| Method Detail |
|---|
void shutdown()
throws java.rmi.RemoteException
java.rmi.RemoteException - if any exception occurs in remote RptServer.
java.lang.String runReport(java.lang.String userID,
java.lang.String catalog,
java.lang.String report,
java.util.Properties propParams)
throws java.rmi.RemoteException
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 contains 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);
//set the parameter APIConst.TAG_JDBC_CONNECTION_OBJECT(jrs.jdbc_connection_object) to run a report.
propParams.put(APIConst.TAG_JDBC_CONNECTION_OBJECT, myCon);
//run the report using this java.sql.Connection object instead of
//the default DB settings in the catalog.
rptServer.runReport(userID, catalog, report, propParams);
java.rmi.RemoteException - if any exception occurs in remote RptServer.
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
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 paramter.
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);
//set the parameter APIConst.TAG_JDBC_CONNECTION_OBJECT(jrs.jdbc_connection_object) to run a report.
propParams.put(APIConst.TAG_JDBC_CONNECTION_OBJECT, myCon);
//run 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 millisecond.
java.rmi.RemoteException - if any exception occurs in remote RptServer.
boolean isTempResultReady(java.lang.String tempResultName)
throws java.rmi.RemoteException
tempResultName - the temporary result name.
java.rmi.RemoteException - if any exception occurs in remote RptServer.
java.lang.String waitTempResultReady(java.lang.String tempResultName)
throws java.rmi.RemoteException
tempResultName - the temporary result name.
java.rmi.RemoteException - if any exception occurs in remote RptServer.
ExportedFileList exportResult(java.lang.String userID,
java.lang.String resultFileName,
java.util.Properties props)
throws java.rmi.RemoteException
userID - the user ID.resultFileName - the real filename 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. Value of these properties is true or false.
The properties APIConst.TAG_HTML and APIConst.TAG_RTF. Value of these properties is filename without path(for example: invoice and invoice.rtf).
About properties for each result type,
please see the document "INSTALL_ROOT/help/server/en/userguide/apdx_sch.htm".
java.rmi.RemoteException - if any exception occurs in remote RptServer.
java.lang.String submitScheduledTask(java.lang.String userID,
java.util.Properties propScheduledTask)
throws java.rmi.RemoteException
userID - the user ID.propScheduledTask - the properties of the scheduled task. Please see the file
"INSTALL_ROOT/help/server/en/userguide/apdx_sch.htm" for the instruction of the scheduled task properties.
java.rmi.RemoteException - if any exception occurs in remote RptServer.
java.util.Vector getScheduledTasks()
throws java.rmi.RemoteException
java.rmi.RemoteException - if any exception occurs in remote RptServer.
java.util.Properties getScheduledTask(java.lang.String taskID)
throws java.rmi.RemoteException
taskID - the task ID.
java.rmi.RemoteException - if any exception occurs in remote RptServer.
boolean removeScheduledTask(java.lang.String taskID)
throws java.rmi.RemoteException
taskID - the task ID.
java.rmi.RemoteException - if any exception occurs in remote RptServer.
void removeLargeReport(java.lang.String tempResultName,
boolean isStop)
throws java.rmi.RemoteException
tempResultName - the temporary result name.isStop - if stop the running large reports.
java.rmi.RemoteException - if any exception occurs in remote RptServer.
Member[] getPredefinedServers()
throws java.rmi.RemoteException
java.rmi.RemoteException - if any exception occurs in remote RptServer.
Member[] getAllMembers()
throws java.rmi.RemoteException
java.rmi.RemoteException - if any exception occurs in remote RptServer.
int getServerStatus()
throws java.rmi.RemoteException
RemoteException, - if any exception occurs when calling to remote RptServer.
java.rmi.RemoteException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||