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

    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 rmiregistry operating on the local host on the default port specified by `Constants.PORT_DEFAULT_SAS_RMI_REGISTRY`.
`RMIConfiguration(SSLRMISocketFactories sslRMISocketFactories, java.lang.String id, java.lang.String host, java.lang.String port)` Constructs an RMI configuration using the specified rmiregistry host and port.
`RMIConfiguration(java.lang.String host, int port)` Constructs an RMI configuration using the specified rmiregistry host and port.
`RMIConfiguration(java.lang.String host, java.lang.String port)` Constructs an RMI configuration using the specified rmiregistry host and port.
`RMIConfiguration(java.lang.String id, java.lang.String host, java.lang.String port)` Constructs an RMI configuration using the specified rmiregistry 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 rmiregistry host.
`java.lang.String` | `getId()` Gets the ID.
`int` | `getPort()` Gets the rmiregistry port.
`java.lang.String` | `getPortAsString()` Gets the rmiregistry port as a String.
`java.rmi.registry.Registry` | `getRMIRegistry(boolean isCreateIfNotAlreadyStarted)` Gets the rmiregistry associated with the currently specified host/port.
`java.lang.String` | `getUrl()` Gets a URL defining the rmiregistry host and port.
`java.lang.String` | `getUrl(java.lang.String bindName)` Gets a URL defining the rmiregistry host and port suffixed by the supplied bind name for your RMI service.
`void` | `setHost(java.lang.String host)` Sets the rmiregistry host.
`void` | `setId(java.lang.String id)` Sets the RMI configuration's ID.
`void` | `setPort(java.lang.String port)` Sets the rmiregistry 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 rmiregistry host and port.

  Parameters:
    `host` - rmiregistry host.
    `port` - rmiregistry 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 rmiregistry host and port.

  Parameters:
    `host` - rmiregistry host.
    `port` - rmiregistry 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 rmiregistry host and port. This constructor also specifies an ID string.

  Parameters:
    `id` - Optional value used to identify this configuration. May be `null`.
    `host` - rmiregistry host
    `port` - rmiregistry port
  Throws:
    `InitializationException` - if unable to initialize.

### RMIConfiguration

    public RMIConfiguration(SSLRMISocketFactories sslRMISocketFactories,
                            java.lang.String id,
                            java.lang.String host,
                            java.lang.String port)
                     throws InitializationException

  Constructs an RMI configuration using the specified rmiregistry 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` - rmiregistry host.
    `port` - rmiregistry port.
  Throws:
    `InitializationException` - if unable to initialize.

### RMIConfiguration

    public RMIConfiguration()

  Constructs a configuration for an rmiregistry 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 rmiregistry host.

  Returns:
    rmiregistry host.

### setHost

    public final void setHost(java.lang.String host)

  Sets the rmiregistry host.

  Parameters:
    `host` - rmiregistry host.

### getPort

    public final int getPort()

  Gets the rmiregistry port. If a port wasn't specified then the default rmiregistry port will be returned.

  Returns:
    rmiregistry port.

### getPortAsString

    public final java.lang.String getPortAsString()

  Gets the rmiregistry port as a String. If a port wasn't specified then the default rmiregistry port will be returned.

  Returns:
    rmiregistry port.

### setPort

    public final void setPort(java.lang.String port)
                       throws InitializationException

  Sets the rmiregistry port.

  Parameters:
    `port` - The rmiregistry 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 rmiregistry host and port. Suffix the name of your RMI service to this URL to create a bind name.

  Returns:
    rmiregistry's URL prefix.

### getUrl

    public final java.lang.String getUrl(java.lang.String bindName)

  Gets a URL defining the rmiregistry 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 rmiregistry.
  Returns:
    RMI URL.

### getRMIRegistry

    public final java.rmi.registry.Registry getRMIRegistry(boolean isCreateIfNotAlreadyStarted)
                                                    throws ServiceException

  Gets the rmiregistry 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.