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
Class RemoteReportServerToolkit

    java.lang.Object
      jet.server.api.rmi.RemoteReportServerToolkit

    public final class RemoteReportServerToolkit

extends java.lang.Object

This class provides methods to JReport users to get a handle to remote JReport Server (RptServer) using RMI to wrap the methods on the client as RMI stubs to call the real methods on JReport Server. We refer to this as a remote wrapped JReport Server. For example, if you want to get a remote wrapped JReport Server which is connected to a running JReport Server residing in host 192.168.128.14 and using rmi port 1129, you can invoke the method getRemoteRptServer() like
`RptServer rptServer = getRemoteRptServer("192.168.128.14", "1129");
...`.

Since:
  5.2

Constructor Summary
`RemoteReportServerToolkit()`

Method Summary
`static boolean` | `destroyRemoteFileService(java.lang.String host, java.lang.String port)` Destroys an instance of `RemoteFileService` by the running JReport Server's host and rmi port.
`static RemoteFileService` | `getRemoteFileService(java.lang.String host, java.lang.String port)` Gets `RemoteFileService` instance running at the given host and port.
`static RemoteRptServer` | `getRemoteRptServer(java.lang.String host, java.lang.String port)` Gets the remote interface attached to JReport Server by that running JReport Server's host and rmi port.
`static int` | `getRemoteServerStatus(java.lang.String host, java.lang.String port)` Gets the status of with specified server host and port.
`static HttpRptServer` | `getRemoteWrappedAdminServer(java.lang.String host, java.lang.String port)` Deprecated.
`static HttpRptServer` | `getRemoteWrappedAdminServer(java.lang.String host, java.lang.String port, java.lang.String logPath)` Deprecated.
`static HttpRptServer` | `getRemoteWrappedRptServer(java.lang.String host, java.lang.String port)` Gets remote wrapped JReport Server by a running JReport Server's host and rmi port, which uses system property "user.dir" as log dir.
`static HttpRptServer` | `getRemoteWrappedRptServer(java.lang.String host, java.lang.String port, java.lang.String logPath)` Gets the remote wrapped JReport Server by a running JReport Server's host and rmi port.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RemoteReportServerToolkit

    public RemoteReportServerToolkit()

Method Detail

### getRemoteWrappedRptServer

    public static HttpRptServer getRemoteWrappedRptServer(java.lang.String host,
                                                          java.lang.String port)

  Gets remote wrapped JReport Server by a running JReport Server's host and rmi port, which uses system property "user.dir" as log dir.

  Parameters:
    `host` - Host of a running JReport Server which needs to be connected.
    `port` - RMI port of a running JReport Server which needs to be connected.
  Returns:
    a remote wrapped JReport Server that has been connected to specified running JReport Server, or it returns null if the remote wrapped JReport Server can not be connected to the specified JReport Server.

### getRemoteWrappedRptServer

    public static HttpRptServer getRemoteWrappedRptServer(java.lang.String host,
                                                          java.lang.String port,
                                                          java.lang.String logPath)

  Gets the remote wrapped JReport Server by a running JReport Server's host and rmi port.

  Parameters:
    `host` - Host of a running JReport Server which needs to be connected.
    `port` - RMI port of a running JReport Server which needs to be connected.
    `logPath` - Specifies the directory that the error log of remote wrapped report server is saved to, and the log file name is "error.log".
  Returns:
    a remote wrapped JReport Server that has been connected to specified running JReport Server, or it returns null if the remote wrapped JReport Server can not be connected to the specified JReport Server.

### getRemoteRptServer

    public static RemoteRptServer getRemoteRptServer(java.lang.String host,
                                                     java.lang.String port)

  Gets the remote interface attached to JReport Server by that running JReport Server's host and rmi port.

  Parameters:
    `host` - Host of a running JReport Server which needs to be connected.
    `port` - RMI port of a running JReport Server which needs to be connected.
  Returns:
    a remote interface attached to the specified running JReport Server, or it returns null if the remote wrapped JReport Server can not be connected to specified JReport Server.

### getRemoteWrappedAdminServer

    public static HttpRptServer getRemoteWrappedAdminServer(java.lang.String host,
                                                            java.lang.String port)

  Deprecated.

  Gets the remote wrapped JReport Server that has been connected to an admin server in a JReport cluster. If there is an existing remote wrapped server which is connected to an admin server of a cluster, this method will return the existing remote wrapped server, even though the existing server can not be specified by parameter "host" and "port". Otherwise, it returns a remote wrapped JReport Server by a running JReport Server's host and rmi port. The running JReport Server must be an admin server of a JReport cluster. It will return null only if the specified JReport Server is inactive or not admin server. Uses the value of system property "user.dir" as log dir.

  Parameters:
    `host` - Host of a running JReport Server which needs to be connected.
    `port` - RMI port of a running JReport Server which needs to be connected.
  Returns:
    a remote wrapped JReport Server that has been connected to an admin server, or it returns null if the remote wrapped server can not be connected to the specified JReport Server, or the specified server is not an admin server.

### getRemoteWrappedAdminServer

    public static HttpRptServer getRemoteWrappedAdminServer(java.lang.String host,
                                                            java.lang.String port,
                                                            java.lang.String logPath)

  Deprecated.

  Gets the remote wrapped JReport Server that has been connected to an admin server in a JReport cluster. If there is an existing remote wrapped server which is connected to an admin server of a cluster, this method will return the existing remote wrapped server, even though the existing server can not be specified by parameter "host" and "port". Otherwise, it returns a remote wrapped JReport Server by a running JReport Server's host and rmi port. The running JReport Server must be an admin server of a JReport cluster. It will return null only if the specified JReport Server is inactive or not admin server.

  Parameters:
    `host` - Host of a running JReport Server which needs to be connected.
    `port` - RMI port of a running JReport Server which needs to be connected.
    `logPath` - Specifies the directory that the error log of remote wrapped report server will be saved to, and the log file name is "error.log".
  Returns:
    a remote wrapped JReport Server that has been connected to an admin server, or it returns null if the remote wrapped server can not be connected to the specified JReport Server, or the specified server is not an admin server.

### getRemoteFileService

    public static RemoteFileService getRemoteFileService(java.lang.String host,
                                                         java.lang.String port)

  Gets `RemoteFileService` instance running at the given host and port.

  Parameters:
    `host` - Host of a running JReport Server to connect to.
    `port` - RMI port of a running JReport Server to connect to.
  Returns:
    an instance of a RemoteFileService, or it returns null if the remote wrapped server can not be connected to the specified JReport Server.

### destroyRemoteFileService

    public static boolean destroyRemoteFileService(java.lang.String host,
                                                   java.lang.String port)

  Destroys an instance of `RemoteFileService` by the running JReport Server's host and rmi port.

  Parameters:
    `host` - Host of a running JReport Server that needs to be connected.
    `port` - RMI port of a running JReport Server which needs to be connected.
  Returns:
    true if the RemoteFileService instance actually exists in JReport Server before being destroyed, returns false if it doesn't exist.

### getRemoteServerStatus

    public static int getRemoteServerStatus(java.lang.String host,
                                            java.lang.String port)

  Gets the status of with specified server host and port.

  Returns:
    the status integer value of specified server. The available values are: ReportServerRMIWrapper.UNKNOWN, ReportServerRMIWrapper.OOME, ReportServerRMIWrapper.RUNNING

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