alma::acs::util::AcsLocations Class Reference

Collaboration diagram for alma::acs::util::AcsLocations:
Collaboration graph
[legend]

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 [inline, 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,
String  protocol 
) [inline, static]

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

References CDB_SYMBOL.

static String alma::acs::util::AcsLocations::convertToCdbLocation ( String  host,
String  port 
) [inline, static]

Composes a CDB corbaloc for the specified host and port.

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

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

Deprecated:
because the daemon port is fixed.

References CONTAINERDAEMON_SYMBOL.

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

Composes a ContainerDaemon corbaloc for the specified host and port.

Deprecated:
because the daemon port is fixed.

References convertToContainerDaemonLocation().

static String alma::acs::util::AcsLocations::convertToContainerDaemonLocation ( String  host  )  [inline, static]

Composes a ContainerDaemon corbaloc for the specified host.

References CONTAINERDAEMON_SYMBOL.

Referenced by convertToContainerDaemonLocation().

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

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

References INTERFACEREPOSITORY_SYMBOL.

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

Composes a InterfaceRepository corbaloc for the specified host and port.

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

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

References MANAGER_SYMBOL.

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

Composes a Manager corbaloc for the specified host and port.

Referenced by figureOutManagerLocation().

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

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

References NAMESERVICE_SYMBOL.

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

Composes a NameService corbaloc for the specified host and port.

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

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

Deprecated:
because the daemon port is fixed.

References SERVICESDAEMON_SYMBOL.

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

Composes a ServicesDaemon corbaloc for the specified host and port.

Deprecated:
because the daemon port is fixed.

References convertToServicesDaemonLocation().

static String alma::acs::util::AcsLocations::convertToServicesDaemonLocation ( String  host  )  [inline, static]

Composes a ServicesDaemon corbaloc for the specified host.

References SERVICESDAEMON_SYMBOL.

Referenced by convertToServicesDaemonLocation().

static String alma::acs::util::AcsLocations::figureOutManagerLocation (  )  [inline, 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 convertToManagerLocation().

static String alma::acs::util::AcsLocations::getLocalIP (  )  [inline, 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

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 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 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 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 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 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 convertToServicesDaemonLocation().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2