All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

## com.sas.services.deployment
Class RMIConfiguration

    com.sas.services.deployment.RMIConfiguration

All Implemented Interfaces:
  java.io.Serializable

    @SASScope(value="ALL")
    @BinaryCompatibilityOnly
    public class RMIConfiguration

implements java.io.Serializable

RMI configuration that defines a deployment configuration for an RMI remote object registry.

- host
- port

Since:
  1.0
See Also:
  `RMIBinding`, Serialized Form

Field Summary
`static int` | `DEFAULT_PORT` Default service registry port.
`static java.lang.String` | `LOCALHOST` Local host

Constructor Summary
`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`.
`RMIConfiguration(com.sas.net.ssl.SSLRMISocketFactories sslRMISocketFactories, java.lang.String id, java.lang.String host, java.lang.String port)` Constructs an RMI configuration using the specified RMI object registry host and port.
`RMIConfiguration(java.lang.String host, int port)` Constructs an RMI configuration using the specified RMI object registry host and port.
`RMIConfiguration(java.lang.String host, java.lang.String port)` Constructs an RMI configuration using the specified RMI object registry host and port.
`RMIConfiguration(java.lang.String id, java.lang.String host, java.lang.String port)` Constructs an RMI configuration using the specified RMI object registry host and port.

Method Summary
`java.rmi.registry.Registry` | `createRegistry()` Creates an RMI registry.
`void` | `destroy()` Clears the reference to the RMI registry.
`java.lang.String` | `getHost()` Gets the RMI object registry host.
`java.lang.String` | `getId()` Gets the ID.
`int` | `getPort()` Gets the RMI object registry port.
`java.lang.String` | `getPortAsString()` Gets the RMI object registry port as a String.
`java.rmi.registry.Registry` | `getRMIRegistry(boolean isCreateIfNotAlreadyStarted)` Gets the RMI object registry associated with the currently specified host/port.
`java.lang.String` | `getUrl()` Gets a URL defining the RMI object registry host and port.
`java.lang.String` | `getUrl(java.lang.String bindName)` Gets a URL defining the RMI object registry host and port suffixed by the supplied bind name for your RMI service.
`void` | `setHost(java.lang.String host)` Sets the RMI object registry host.
`void` | `setId(java.lang.String id)` Sets the RMI configuration's ID.
`void` | `setPort(java.lang.String port)` Sets the RMI object registry port.
`java.lang.String` | `toString()` Gets a URL that represents the RMI registry.

Field Detail

### DEFAULT_PORT

    public static final int DEFAULT_PORT

  Default service registry port. May be used to initialize user interfaces, etc.

  See Also:
    Constant Field Values

### LOCALHOST

    public static final java.lang.String LOCALHOST

  Local host

  See Also:
    Constant Field Values

Constructor Detail

### RMIConfiguration

    public RMIConfiguration(java.lang.String host,
                            java.lang.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(java.lang.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(java.lang.String id,
                            java.lang.String host,
                            java.lang.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,
                            java.lang.String id,
                            java.lang.String host,
                            java.lang.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 Detail

### createRegistry

    public final java.rmi.registry.Registry createRegistry()
                                                    throws java.rmi.RemoteException

  Creates an RMI registry.

  Returns:
    RMIregistry
  Throws:
    `java.rmi.RemoteException` - if unable to create an RMI registry.

### destroy

    public void destroy()

  Clears the reference to the RMI registry.

### getId

    public final java.lang.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(java.lang.String id)

  Sets the RMI configuration's ID.

  Parameters:
    `id` - RMI configuration's ID.

### getHost

    public final java.lang.String getHost()

  Gets the RMI object registry host.

  Returns:
    RMI object registry host.

### setHost

    public final void setHost(java.lang.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 java.lang.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(java.lang.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 java.lang.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 java.lang.String getUrl(java.lang.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 java.rmi.registry.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 java.lang.String toString()

  Gets a URL that represents the RMI registry.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    URL representing the RMI registry.

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

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Foundation |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.