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

com.sas.services.deployment
Class RMIConfiguration

java.lang.Object
  |
  +--com.sas.services.deployment.RMIConfiguration
All Implemented Interfaces:

public class RMIConfiguration
extends Object
implements java.io.Serializable

RMI configuration that defines an rmiregistry host/port deployment configuration.

Since:
1.0
See Also:
RMIBinding, Serialized Form

Field Summary
static int DEFAULT_PORT
          Default service registry port.
static String LOCALHOST
          Local host
 
Constructor Summary
RMIConfiguration()
          Constructs a configuration for an rmiregistry operating on the local host on the default port 1099.
RMIConfiguration(String host, int port)
          Constructs an RMI configuration using the specified rmiregistry host and port.
RMIConfiguration(String host, String port)
          Constructs an RMI configuration using the specified rmiregistry host and port.
RMIConfiguration(String id, String host, String port)
          Constructs an RMI configuration using the specified rmiregistry host and port.
 
Method Summary
 Registry createRegistry()
          Creates an RMI registry.
 String getHost()
          Gets the rmiregistry host.
 String getId()
          Gets the ID.
 int getPort()
          Gets the rmiregistry port.
 String getPortAsString()
          Gets the rmiregistry port as a String.
 Registry getRegistry()
          Gets the rmiregistry associated with the currently specified host/port.
 Registry getRegistry(boolean isCreateRegistryIfOneNotAvailable)
          Gets the rmiregistry associated with the currently specified host/port.
 String getUrl()
          Gets a URL defining the rmiregistry host and port.
 String getUrl(String bindName)
          Gets a URL defining the rmiregistry host and port suffixed by the supplied bind name for your RMI service.
 void setHost(String host)
          Sets the rmiregistry host.
 void setId(String id)
          Sets the RMI configuration's ID.
 void setPort(String port)
          Sets the rmiregistry port.
 String toString()
          Gets a string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PORT

public static final int DEFAULT_PORT
Default service registry port. May be used to initialize user interfaces, etc.

LOCALHOST

public static final String LOCALHOST
Local host
Constructor Detail

RMIConfiguration

public RMIConfiguration(String host,
                        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(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(String id,
                        String host,
                        String port)
                 throws InitializationException
Constructs an RMI configuration using the specified rmiregistry host and port. This constructor also specifies an ID string.
Parameters:
id - ID
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 1099.
Method Detail

createRegistry

public final Registry createRegistry()
                              throws RemoteException
Creates an RMI registry.
Returns:
RMIregistry
Throws:
RemoteException - if unable to create an 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 rmiregistry host.
Returns:
rmiregistry host.

setHost

public final void setHost(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 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(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 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 String getUrl(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.

getRegistry

public final Registry getRegistry()
Gets the rmiregistry associated with the currently specified host/port. If an RMI registry is not already running, then an attempt will be made to start a registry.
Returns:
RMI registry or null if an RMI registry is not running on the specified host/port.

getRegistry

public final Registry getRegistry(boolean isCreateRegistryIfOneNotAvailable)
Gets the rmiregistry associated with the currently specified host/port.
Parameters:
isCreateRegistryIfOneNotAvailable - true if an RMI registry should be started if one is not already running, otherwise false.
Returns:
RMI registry or null if an RMI registry is not running on the specified host/port.

toString

public final String toString()
Gets a string representation of this instance.
Overrides:
toString in class Object
Returns:
Debug statement describing this instance.

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




Copyright © 2006 SAS Institute Inc. All Rights Reserved.
javadoc generated Fri, 10 Feb 2006 17:28:53