*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.deployment
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
FieldsModifier and TypeFieldDescriptionstatic final intDefault service registry port.static final StringLocal host -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a configuration for an RMI object registry operating on the local host on the default port specified byConstants.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 TypeMethodDescriptionfinal RegistryCreates an RMI registry.voiddestroy()Clears the reference to the RMI registry.final StringgetHost()Gets the RMI object registry host.final StringgetId()Gets the ID.final intgetPort()Gets the RMI object registry port.final StringGets the RMI object registry port as a String.final RegistrygetRMIRegistry(boolean isCreateIfNotAlreadyStarted) Gets the RMI object registry associated with the currently specified host/port.final StringgetUrl()Gets a URL defining the RMI object registry host and port.final StringgetUrl(String bindName) Gets a URL defining the RMI object registry host and port suffixed by the supplied bind name for your RMI service.final voidsetHost(String host) Sets the RMI object registry host.final voidsetId(String id) Sets the RMI configuration's ID.final voidsetPort(String port) Sets the RMI object registry port.final StringtoString()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_PORTDefault service registry port. May be used to initialize user interfaces, etc.- See Also:
-
LOCALHOST
public static final String LOCALHOSTLocal host- See Also:
-
-
Constructor Details
-
RMIConfiguration
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
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
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 benull.host- RMI object registry hostport- 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 ornullif thedefaultsocket factory should be used.id- Optional value used to identify this configuration. May benull.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 byConstants.PORT_DEFAULT_SAS_RMI_REGISTRY.
-
-
Method Details
-
createRegistry
public final Registry createRegistry() throws RemoteExceptionCreates 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
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
Gets the RMI object registry associated with the currently specified host/port.- Parameters:
isCreateIfNotAlreadyStarted-trueif an RMI registry should be started if one is not already running, otherwisefalse.- 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:
toStringin classObject- Returns:
- URL representing the RMI registry.
-