Class RMIURL

java.lang.Object
com.primavera.integration.client.RMIURL

public class RMIURL extends Object
This helper class is used to generate the URL for Remote Mode required by Session's getDatabaseInstances() and login() methods. The service mode used (standard, compression or SSL) is differentiated by the URL.
  • Field Details

    • LOCAL_SERVICE

      public static final int LOCAL_SERVICE
      Local mode.
      See Also:
    • STANDARD_RMI_SERVICE

      public static final int STANDARD_RMI_SERVICE
      Standard service mode.
      See Also:
    • COMPRESSION_RMI_SERVICE

      public static final int COMPRESSION_RMI_SERVICE
      Compression service mode.
      See Also:
    • SSL_RMI_SERVICE

      public static final int SSL_RMI_SERVICE
      SSL service mode.
      See Also:
  • Method Details

    • getRmiUrl

      public static String getRmiUrl()
      Return the default URL for an RMI standard service 'RemoteSession'.
      Returns:
      the default URL for an RMI standard service
    • getRmiUrl

      public static String getRmiUrl(int iMode)
      Return the URL for an RMI service 'RemoteSession' for the specified service mode using the default host and port.
      Parameters:
      iMode - indicates standard/compression/SSL mode
      Returns:
      the URL for an RMI service
    • getRmiUrl

      public static String getRmiUrl(int iMode, String sHost, int iPort)
      Return the URL for an RMI service 'RemoteSession' for the specified service mode, host and port.
      Parameters:
      iMode - indicates standard/compression/SSL mode
      sHost - the RMI registry host
      iPort - the RMI registry port number
      Returns:
      the URL for an RMI service
      Throws:
      IllegalArgumentException - if the host parameter is null
    • getDefaultHost

      public static String getDefaultHost()
      Gets the default RMI registry host.
      Returns:
      the default RMI registry host
    • setDefaultHost

      public static void setDefaultHost(String sHost)
      Sets the default RMI registry host.
      Parameters:
      sHost - the new default RMI registry host
      Throws:
      IllegalArgumentException - if the host parameter is null
    • getDefaultPort

      public static int getDefaultPort()
      Gets the default RMI registry port number.
      Returns:
      the default RMI registry port number
    • setDefaultPort

      public static void setDefaultPort(int iPort)
      Sets the default RMI registry port number.
      Parameters:
      iPort - the new default RMI registry port number