Static Public Member Functions | Static Public Attributes

alma.acs.util.AcsLocations Class Reference

List of all members.

Static Public Member Functions

static String getLocalIP ()
static String figureOutManagerLocation ()
static String[] convert (String loc) throws IllegalArgumentException
static String convertToManagerLocation (String host, String port)
static String convertToManagerLocation (String host, String port, String protocol)
static String convertToNameServiceLocation (String host, String port)
static String convertToNameServiceLocation (String host, String port, String protocol)
static String convertToInterfaceRepositoryLocation (String host, String port)
static String convertToInterfaceRepositoryLocation (String host, String port, String protocol)
static String convertToCdbLocation (String host, String port)
static String convertToCdbLocation (String host, String port, String protocol)
static String convertToServicesDaemonLocation (String host)
static String convertToServicesDaemonLocation (String host, String port)
static String convertToServicesDaemonLocation (String host, String port, String protocol)
static String convertToContainerDaemonLocation (String host)
static String convertToContainerDaemonLocation (String host, String port)
static String convertToContainerDaemonLocation (String host, String port, String protocol)

Static Public Attributes

static String MANAGER_SYMBOL = "Manager"
static String NAMESERVICE_SYMBOL = "NameService"
static String INTERFACEREPOSITORY_SYMBOL = "InterfaceRepository"
static String CDB_SYMBOL = "CDB"
static final String SERVICESDAEMON_SYMBOL = "ACSServicesDaemon"
static final String CONTAINERDAEMON_SYMBOL = "ACSContainerDaemon"

Detailed Description

Provides some support for dealing with manager references and corbalocs.

Author:
mschilli

Member Function Documentation

static String [] alma.acs.util.AcsLocations.convert ( String  loc  )  throws IllegalArgumentException [static]

Extracts host and port from a location string (either a corbaloc or an IOR).

This method is the counterpart to all the convertTo... methods defined in this class.

The location string's format is recognized by the prefix (case insensitive). If the format is unknown, an exception will be thrown.

Parameters:
loc a CORBALOC or an IOR
Returns:
an array {host, port}
Exceptions:
IllegalArgumentException If the location has an unknown format or is otherwise invalid
static String alma.acs.util.AcsLocations.convertToCdbLocation ( String  host,
String  port 
) [static]

Composes a CDB corbaloc for the specified host and port.

static String alma.acs.util.AcsLocations.convertToCdbLocation ( String  host,
String  port,
String  protocol 
) [static]

Composes a CDB corbaloc for the specified host, port, and protocol.

References alma.acs.util.AcsLocations.CDB_SYMBOL.

static String alma.acs.util.AcsLocations.convertToContainerDaemonLocation ( String  host,
String  port 
) [static]

Composes a ContainerDaemon corbaloc for the specified host and port.

Deprecated:
because the daemon port is fixed.

References alma.acs.util.AcsLocations.convertToContainerDaemonLocation().

static String alma.acs.util.AcsLocations.convertToContainerDaemonLocation ( String  host,
String  port,
String  protocol 
) [static]

Composes a ContainerDaemon corbaloc for the specified host, port, and protocol.

Deprecated:
because the daemon port is fixed.

References alma.acs.util.AcsLocations.CONTAINERDAEMON_SYMBOL.

static String alma.acs.util.AcsLocations.convertToContainerDaemonLocation ( String  host  )  [static]

Composes a ContainerDaemon corbaloc for the specified host.

References alma.acs.util.AcsLocations.CONTAINERDAEMON_SYMBOL.

Referenced by alma.acs.util.AcsLocations.convertToContainerDaemonLocation().

static String alma.acs.util.AcsLocations.convertToInterfaceRepositoryLocation ( String  host,
String  port,
String  protocol 
) [static]

Composes a InterfaceRepository corbaloc for the specified host, port, and protocol.

References alma.acs.util.AcsLocations.INTERFACEREPOSITORY_SYMBOL.

static String alma.acs.util.AcsLocations.convertToInterfaceRepositoryLocation ( String  host,
String  port 
) [static]

Composes a InterfaceRepository corbaloc for the specified host and port.

static String alma.acs.util.AcsLocations.convertToManagerLocation ( String  host,
String  port 
) [static]

Composes a Manager corbaloc for the specified host and port.

Referenced by alma.acs.util.AcsLocations.figureOutManagerLocation().

static String alma.acs.util.AcsLocations.convertToManagerLocation ( String  host,
String  port,
String  protocol 
) [static]

Composes a Manager corbaloc for the specified host, port, and protocol.

References alma.acs.util.AcsLocations.MANAGER_SYMBOL.

static String alma.acs.util.AcsLocations.convertToNameServiceLocation ( String  host,
String  port,
String  protocol 
) [static]

Composes a NameService corbaloc for the specified host, port, and protocol.

References alma.acs.util.AcsLocations.NAMESERVICE_SYMBOL.

static String alma.acs.util.AcsLocations.convertToNameServiceLocation ( String  host,
String  port 
) [static]

Composes a NameService corbaloc for the specified host and port.

static String alma.acs.util.AcsLocations.convertToServicesDaemonLocation ( String  host  )  [static]

Composes a ServicesDaemon corbaloc for the specified host.

References alma.acs.util.AcsLocations.SERVICESDAEMON_SYMBOL.

Referenced by alma.acs.util.AcsLocations.convertToServicesDaemonLocation().

static String alma.acs.util.AcsLocations.convertToServicesDaemonLocation ( String  host,
String  port,
String  protocol 
) [static]

Composes a ServicesDaemon corbaloc for the specified host, port, and protocol.

Deprecated:
because the daemon port is fixed.

References alma.acs.util.AcsLocations.SERVICESDAEMON_SYMBOL.

static String alma.acs.util.AcsLocations.convertToServicesDaemonLocation ( String  host,
String  port 
) [static]

Composes a ServicesDaemon corbaloc for the specified host and port.

Deprecated:
because the daemon port is fixed.

References alma.acs.util.AcsLocations.convertToServicesDaemonLocation().

static String alma.acs.util.AcsLocations.figureOutManagerLocation (  )  [static]

Figures out the manager location by reading the related system properties, otherwise falls back to a default value.

The strategy uses the following order:

  1. if both exist, use properties ACS.managerhost and ACS.baseport
  2. if it exists, use property ACS.manager
  3. if it exists, use ACS.baseport together with local IP
  4. use port 3000 together with local IP
Returns:
our best guess for a valid manager location (something like corbaloc::134.171.27.234:3000/Manager)

References alma.acs.util.AcsLocations.convertToManagerLocation().

static String alma.acs.util.AcsLocations.getLocalIP (  )  [static]

Returns the stringified IP or "localhost" if an error were to occur. This method forwards to ACSPorts#getIP().

Returns:
the stringified IP or "localhost" if an error were to occur.

Member Data Documentation

String alma.acs.util.AcsLocations.CDB_SYMBOL = "CDB" [static]

The suffix for a cdb-dal location. Note: Not a constant, to allow for changes at runtime in case this might be needed.

Referenced by alma.acs.util.AcsLocations.convertToCdbLocation().

final String alma.acs.util.AcsLocations.CONTAINERDAEMON_SYMBOL = "ACSContainerDaemon" [static]

The suffix for a ContainerDaemon location.

Note that this string constant is also defined in acsdaemon.idl and would be accessible as "alma.acsdaemon.containerDaemonServiceName.value" if module acsdaemonidl would not come after jacsutil. clean up the module dependencies.

Referenced by alma.acs.util.AcsLocations.convertToContainerDaemonLocation().

String alma.acs.util.AcsLocations.INTERFACEREPOSITORY_SYMBOL = "InterfaceRepository" [static]

The suffix for a InterfaceRepository location. Note: Not a constant, to allow for changes at runtime in case this might be needed.

Referenced by alma.acs.util.AcsLocations.convertToInterfaceRepositoryLocation().

String alma.acs.util.AcsLocations.MANAGER_SYMBOL = "Manager" [static]

The suffix for a Manager location. Note: Not a constant, to allow for changes at runtime in case this might be needed.

Referenced by alma.acs.util.AcsLocations.convertToManagerLocation().

String alma.acs.util.AcsLocations.NAMESERVICE_SYMBOL = "NameService" [static]

The suffix for a NameService location. Note: Not a constant, to allow for changes at runtime in case this might be needed.

Referenced by alma.acs.util.AcsLocations.convertToNameServiceLocation().

final String alma.acs.util.AcsLocations.SERVICESDAEMON_SYMBOL = "ACSServicesDaemon" [static]

The suffix for a ServicesDaemon location.

Note that this string constant is also defined in acsdaemon.idl and would be accessible as "alma.acsdaemon.servicesDaemonServiceName.value" if module acsdaemonidl would not come after jacsutil. clean up the module dependencies.

Referenced by alma.acs.util.AcsLocations.convertToServicesDaemonLocation().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties