*** This class provides Binary Compatibility only, not Source Compatibility ***

Class RMIConfiguration

java.lang.Object
com.sas.services.deployment.RMIConfiguration
All Implemented Interfaces:
Serializable

@SASScope("ALL") @BinaryCompatibilityOnly public class RMIConfiguration extends Object implements Serializable
RMI configuration that defines a deployment configuration for an RMI remote object registry.
  • host
  • port
Since:
1.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default service registry port.
    static final String
    Local host
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a configuration for an RMI object registry operating on the local host on the default port specified by Constants.PORT_DEFAULT_SAS_RMI_REGISTRY.
    RMIConfiguration(com.sas.net.ssl.SSLRMISocketFactories sslRMISocketFactories, String id, String host, String port)
    Constructs an RMI configuration using the specified RMI object registry host and port.
    RMIConfiguration(String host, int port)
    Constructs an RMI configuration using the specified RMI object registry host and port.
    RMIConfiguration(String host, String port)
    Constructs an RMI configuration using the specified RMI object registry host and port.
    RMIConfiguration(String id, String host, String port)
    Constructs an RMI configuration using the specified RMI object registry host and port.
  • Method Summary

    Modifier and Type
    Method
    Description
    final Registry
    Creates an RMI registry.
    void
    Clears the reference to the RMI registry.
    final String
    Gets the RMI object registry host.
    final String
    Gets the ID.
    final int
    Gets the RMI object registry port.
    final String
    Gets the RMI object registry port as a String.
    final Registry
    getRMIRegistry(boolean isCreateIfNotAlreadyStarted)
    Gets the RMI object registry associated with the currently specified host/port.
    final String
    Gets a URL defining the RMI object registry host and port.
    final String
    getUrl(String bindName)
    Gets a URL defining the RMI object registry host and port suffixed by the supplied bind name for your RMI service.
    final void
    setHost(String host)
    Sets the RMI object registry host.
    final void
    setId(String id)
    Sets the RMI configuration's ID.
    final void
    setPort(String port)
    Sets the RMI object registry port.
    final String
    Gets a URL that represents the RMI registry.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      Default service registry port. May be used to initialize user interfaces, etc.
      See Also:
    • LOCALHOST

      public static final String LOCALHOST
      Local host
      See Also:
  • Constructor Details

    • RMIConfiguration

      public RMIConfiguration(String host, String port) throws InitializationException
      Constructs an RMI configuration using the specified RMI object registry host and port.
      Parameters:
      host - RMI object registry host.
      port - RMI object registry port.
      Throws:
      InitializationException - if unable to initialize.
    • RMIConfiguration

      public RMIConfiguration(String host, int port) throws InitializationException
      Constructs an RMI configuration using the specified RMI object registry host and port.
      Parameters:
      host - RMI object registry host.
      port - RMI object registry port.
      Throws:
      InitializationException - if unable to initialize.
    • RMIConfiguration

      public RMIConfiguration(String id, String host, String port) throws InitializationException
      Constructs an RMI configuration using the specified RMI object registry host and port. This constructor also specifies an ID string.
      Parameters:
      id - Optional value used to identify this configuration. May be null.
      host - RMI object registry host
      port - RMI object registry port
      Throws:
      InitializationException - if unable to initialize.
    • RMIConfiguration

      public RMIConfiguration(com.sas.net.ssl.SSLRMISocketFactories sslRMISocketFactories, String id, String host, String port) throws InitializationException
      Constructs an RMI configuration using the specified RMI object registry host and port.
      Parameters:
      sslRMISocketFactories - Factory for RMI sockets or null if the default socket factory should be used.
      id - Optional value used to identify this configuration. May be null.
      host - RMI object registry host.
      port - RMI object registry port.
      Throws:
      InitializationException - if unable to initialize.
    • RMIConfiguration

      public RMIConfiguration()
      Constructs a configuration for an RMI object registry operating on the local host on the default port specified by Constants.PORT_DEFAULT_SAS_RMI_REGISTRY.
  • Method Details

    • createRegistry

      public final Registry createRegistry() throws RemoteException
      Creates an RMI registry.
      Returns:
      RMIregistry
      Throws:
      RemoteException - if unable to create an RMI registry.
    • destroy

      public void destroy()
      Clears the reference to the RMI registry.
    • getId

      public final String getId()
      Gets the ID.
      Returns:
      RMI configuration's ID. If an ID is not specified then an empty string is returned.
    • setId

      public final void setId(String id)
      Sets the RMI configuration's ID.
      Parameters:
      id - RMI configuration's ID.
    • getHost

      public final String getHost()
      Gets the RMI object registry host.
      Returns:
      RMI object registry host.
    • setHost

      public final void setHost(String host)
      Sets the RMI object registry host.
      Parameters:
      host - RMI object registry host.
    • getPort

      public final int getPort()
      Gets the RMI object registry port. If a port wasn't specified then the default RMI object registry port will be returned.
      Returns:
      RMI object registry port.
    • getPortAsString

      public final String getPortAsString()
      Gets the RMI object registry port as a String. If a port wasn't specified then the default RMI object registry port will be returned.
      Returns:
      RMI object registry port.
    • setPort

      public final void setPort(String port) throws InitializationException
      Sets the RMI object registry port.
      Parameters:
      port - The RMI object registry port number.
      Throws:
      InitializationException - if a non-integer value is encountered as the port number.
    • getUrl

      public final String getUrl()
      Gets a URL defining the RMI object registry host and port. Suffix the name of your RMI service to this URL to create a bind name.
      Returns:
      RMI object registry's URL prefix.
    • getUrl

      public final String getUrl(String bindName)
      Gets a URL defining the RMI object registry host and port suffixed by the supplied bind name for your RMI service.
      Parameters:
      bindName - Name used to bind/lookup an RMI service with the RMI object registry.
      Returns:
      RMI URL.
    • getRMIRegistry

      public final Registry getRMIRegistry(boolean isCreateIfNotAlreadyStarted) throws ServiceException
      Gets the RMI object registry associated with the currently specified host/port.
      Parameters:
      isCreateIfNotAlreadyStarted - true if an RMI registry should be started if one is not already running, otherwise false.
      Returns:
      RMI registry.
      Throws:
      ServiceException - if unable to get an RMI registry.
    • toString

      public final String toString()
      Gets a URL that represents the RMI registry.
      Overrides:
      toString in class Object
      Returns:
      URL representing the RMI registry.