ARC SDK
Public Types | Public Member Functions | Static Public Member Functions | Data Fields
Arc::Endpoint Class Reference

Represents an endpoint of a service with a given interface type and capabilities. More...

#include <arc/compute/Endpoint.h>

Public Types

enum  CapabilityEnum
 

Public Member Functions

 Endpoint (const std::string &URLString="", const std::set< std::string > &Capability=std::set< std::string >(), const std::string &InterfaceName="")
 Create a new Endpoint with a list of capability strings. More...
 
 Endpoint (const std::string &URLString, const Endpoint::CapabilityEnum cap, const std::string &InterfaceName="")
 Create a new Endpoint with a single capability specified by the CapabilityEnum. More...
 
 Endpoint (const ExecutionTarget &e, const std::string &rsi="")
 Create new Endpoint from ExecutionTarget object. More...
 
 Endpoint (const ComputingEndpointAttributes &cea, const std::string &rsi="")
 Create new Endpoint from ExecutionTarget object. More...
 
 Endpoint (const ConfigEndpoint &endpoint)
 Create a new Endpoint from a ConfigEndpoint. More...
 
bool HasCapability (Endpoint::CapabilityEnum cap) const
 
bool HasCapability (const std::string &cap) const
 
std::string str () const
 
std::string getServiceName () const
 
bool operator< (const Endpoint &other) const
 
Endpointoperator= (const ConfigEndpoint &e)
 

Static Public Member Functions

static std::string GetStringForCapability (Endpoint::CapabilityEnum cap)
 

Data Fields

std::string URLString
 
std::string InterfaceName
 
std::string HealthState
 
std::string HealthStateInfo
 
std::string QualityLevel
 
std::set< std::string > Capability
 
std::string RequestedSubmissionInterfaceName
 
std::string ServiceID
 

Detailed Description

Represents an endpoint of a service with a given interface type and capabilities.

The type of the interface is described by a string called InterfaceName (from the GLUE2 specification). An Endpoint object must have a URL, and it is quite useless without capabilities (the system has to know if an Endpoint is a service registry or a computing element), but the InterfaceName is optional.

The Endpoint object also contains information about the health state and quality level of the endpoint, and optionally the requested submission interface name, which will be used later if a job will be submitted to a computing element related to this endpoint.

See Also
CapabilityEnum where the capabilities are listed.

Member Enumeration Documentation

The capabilities:
  • REGISTRY: service registry capable of returning endpoints
  • COMPUTINGINFO: local information system of a computing element capable of returning information about the resource
  • JOBLIST: local information system of a computing element capable of returning the list of jobs on the resource
  • JOBSUBMIT: interface of a computing element where jobs can be submitted
  • JOBCREATION: interface of a computing element where jobs can be created
  • UNSPECIFIED: unspecified capability

Constructor & Destructor Documentation

Arc::Endpoint::Endpoint ( const std::string &  URLString = "",
const std::set< std::string > &  Capability = std::set<std::string>(),
const std::string &  InterfaceName = "" 
)
inline

Create a new Endpoint with a list of capability strings.

Parameters
[in]URLStringis a string representing the URL of the endpoint
[in]Capabilityis a list of capability strings specifying the capabilities of the service
[in]InterfaceNameis a string specifying the type of the interface of the service
Arc::Endpoint::Endpoint ( const std::string &  URLString,
const Endpoint::CapabilityEnum  cap,
const std::string &  InterfaceName = "" 
)
inline

Create a new Endpoint with a single capability specified by the CapabilityEnum.

Parameters
[in]URLStringis a string representing the URL of the endpoint
[in]capis a CapabilityEnum specifying the single capability of the endpoint
[in]InterfaceNameis an optional string specifying the type of the interface
Arc::Endpoint::Endpoint ( const ExecutionTarget e,
const std::string &  rsi = "" 
)

Create new Endpoint from ExecutionTarget object.

Parameters
eExecutionTarget object to create new Endpoint from.
rsistring specifying the requested submission interface if any. Default value is the empty string.
Arc::Endpoint::Endpoint ( const ComputingEndpointAttributes cea,
const std::string &  rsi = "" 
)

Create new Endpoint from ExecutionTarget object.

Parameters
ceaComputingEndpointAttributes object to create new Endpoint from.
rsistring specifying the requested submission interface if any. Default value is the empty string.
Arc::Endpoint::Endpoint ( const ConfigEndpoint endpoint)
inline

Create a new Endpoint from a ConfigEndpoint.

The URL, InterfaceName and the RequestedSubmissionInterfaceName will be copied from the ConfigEndpoint, and if the type of the ConfigEndpoint is REGISTRY or COMPUTINGINFO, the given capability will be added to the new Endpoint object.

Parameters
[in]endpointis the ConfigEndpoint object which will be converted to an Endpoint

This will call operator=.

Member Function Documentation

std::string Arc::Endpoint::getServiceName ( ) const

A string identifying the service exposing this endpoint. It currently extracts the host name from the URL, but this may be refined later.

static std::string Arc::Endpoint::GetStringForCapability ( Endpoint::CapabilityEnum  cap)
inlinestatic

Get the string representation of the given CapabilityEnum.

bool Arc::Endpoint::HasCapability ( Endpoint::CapabilityEnum  cap) const

Checks if the Endpoint has the given capability specified by a CapabilityEnum

Parameters
[in]capis the specified CapabilityEnum
Returns
true if the Endpoint has the given capability
bool Arc::Endpoint::HasCapability ( const std::string &  cap) const

Checks if the Endpoint has the given capability specified by a string

Parameters
[in]capis a string specifying a capability
Returns
true if the Endpoint has the given capability
bool Arc::Endpoint::operator< ( const Endpoint other) const

Needed for std::map to be able to sort the keys

Endpoint& Arc::Endpoint::operator= ( const ConfigEndpoint e)

Copy a ConfigEndpoint into the Endpoint

std::string Arc::Endpoint::str ( ) const

Returns a string representation of the Endpoint containing the URL, the main capability and the InterfaceName

Field Documentation

std::set<std::string> Arc::Endpoint::Capability

Set of GLUE2 Capability strings

std::string Arc::Endpoint::HealthState

GLUE2 HealthState

std::string Arc::Endpoint::HealthStateInfo

GLUE2 HealthStateInfo

std::string Arc::Endpoint::InterfaceName

The type of the interface (GLUE2 InterfaceName)

std::string Arc::Endpoint::QualityLevel

GLUE2 QualityLevel

std::string Arc::Endpoint::RequestedSubmissionInterfaceName

A GLUE2 InterfaceName requesting an InterfaceName used for job submission.

If a user specifies an InterfaceName for submitting jobs, that information will be stored here and will be used when collecting information about the computing element. Only those job submission interfaces will be considered which has this requested InterfaceName.

std::string Arc::Endpoint::ServiceID

The ID of the service this Endpoint belongs to

std::string Arc::Endpoint::URLString

The string representation of the URL of the Endpoint


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