#include <service_description.hpp>
Public Member Functions | |
~service_description (void) SAGA_THROW_SPEC() throw () | |
service_description & | operator= (saga::object const &o) SAGA_THROW_SPEC() throw () |
std::string | get_url () SAGA_THROW_SPEC() throw () |
std::vector < saga::sd::service_description > | get_related_services () SAGA_THROW_SPEC() throw (saga::authorization_failed, saga::authentication_failed, saga::timeout, saga::no_success) |
saga::sd::service_data & | get_data () SAGA_THROW_SPEC() throw () |
Protected Member Functions | |
service_description (saga::impl::service_description *impl) | |
void | set_session (TR1::shared_ptr< saga::session > sess) |
void | set_data (std::string data_key, std::string data_value) |
service_description (saga::url loc) | |
service_description (saga::object const &o) |
Read access to the top level data of the service and a means to navigate to related services. This class implements the attributes interface and offers getter methods to obtain details of that service. The attributes are based on those found in GLUE. They are:
Url
Type
Uid
Site
Name
implementor
Related_Services
saga::sd::service_description::service_description | ( | saga::impl::service_description * | impl | ) | [explicit, protected] |
saga::sd::service_description::service_description | ( | saga::url | loc | ) | [protected] |
Default constructor
References saga::url::get_url(), saga::sd::attributes::service_description_capability, saga::sd::attributes::service_description_implementation_version, saga::sd::attributes::service_description_implementor, saga::sd::attributes::service_description_information_provider_url, saga::sd::attributes::service_description_interface_version, saga::sd::attributes::service_description_name, saga::sd::attributes::service_description_relatedservices, saga::sd::attributes::service_description_site, saga::sd::attributes::service_description_type, saga::sd::attributes::service_description_uid, saga::sd::attributes::service_description_url, saga::sd::attributes::service_description_vo, and saga::detail::attribute< service_description >::set_attribute().
saga::sd::service_description::service_description | ( | saga::object const & | o | ) | [explicit, protected] |
References saga::BadParameter, saga::object::get_type(), and saga::object::ServiceDescription.
saga::sd::service_description::~service_description | ( | void | ) | throw () |
Destructor
void saga::sd::service_description::set_session | ( | TR1::shared_ptr< saga::session > | sess | ) | [protected] |
void saga::sd::service_description::set_data | ( | std::string | data_key, | |
std::string | data_value | |||
) | [protected] |
service_description & saga::sd::service_description::operator= | ( | saga::object const & | o | ) | throw () |
std::string saga::sd::service_description::get_url | ( | ) | throw () |
Returns the URL
to contact the service. The URL
may also be obtained using the saga::attributes
interface.
References saga::detail::attribute< service_description >::attribute_exists(), saga::BadParameter, saga::detail::attribute< service_description >::get_attribute(), and saga::sd::attributes::service_description_url.
std::vector< saga::sd::service_description > saga::sd::service_description::get_related_services | ( | ) | throw (saga::authorization_failed, saga::authentication_failed, saga::timeout, saga::no_success) |
Returns a vector of related services. Alternatively, the saga::attributes
interface may be used to get the uids of the related services.
authorization_failed | if none of the available contexts of the used session could be used for successful authorization. That error indicates that the resource could not be accessed at all, and not that an operation was not available due to restricted permissions. | |
authentication_failed | if none of the available session contexts could successfully be used for authentication | |
timeout | if a remote operation did not complete successfully because the network communication or the remote service timed out | |
no_success | if no result can be returned because of information system or other internal problems |
References saga::detail::attribute< service_description >::attribute_exists(), saga::detail::attribute< service_description >::get_attribute(), saga::object::get_session(), saga::detail::attribute< service_description >::get_vector_attribute(), saga::sd::discoverer::list_services(), saga::sd::attributes::service_description_information_provider_url, and saga::sd::attributes::service_description_relatedservices.
saga::sd::service_data & saga::sd::service_description::get_data | ( | ) | throw () |
Returns a service_data
object with the service data key/value pairs.