RTI Web Integration Service Version 7.7.0
rti::webdds::ServiceProperty Class Reference

Configuration properties for a RTI Web Integration Service object. More...

#include <ServiceProperty.hpp>

Public Member Functions

 ServiceProperty ()
 Construct a new Service Property object. More...
 
 ~ServiceProperty ()
 Destroy the Service Property object. More...
 
ServiceProperty & enable_builtin_topics (bool value)
 Set it to true to enable the Builtin Topics REST API. More...
 
bool enable_builtin_topics () const
 Getter (see setter with the same name). More...
 
ServiceProperty & enable_websockets (bool value)
 Set it to true to enable the WebSockets REST API. More...
 
bool enable_websockets () const
 Getter (see setter with the same name). More...
 
bool list_api_keys () const
 Getter (see setter with the same name). More...
 
ServiceProperty & enable_resource_caching (bool value)
 Caches entities thread-specific storage. More...
 
bool enable_resource_caching () const
 Getter (see setter with the same name). More...
 
ServiceProperty & use_custom_logger (bool value)
 Enables the use of a custom logger. More...
 
bool use_custom_logger () const
 Getter (see setter with the same name). More...
 
const std::string * webserver_option (const std::string &option) const
 Get the value of the webserver option. More...
 
const std::vector< std::string > & webserver_options () const
 This method return the webserver_options_ array. the values are used as pairs of key-value each 2 values. More...
 
ServiceProperty & cfgfile (const std::string &cfgfile)
 Specifies a configuration file to be loaded. More...
 
const std::string & cfgfile () const
 Getter (see setter with the same name). More...
 
ServiceProperty & cfgname (const std::string &cfgname)
 The name of the RTI Web Integration Service configuration to run. More...
 
const std::string & cfgname () const
 Getter (see setter with the same name). More...
 
ServiceProperty & acl_file (const std::string &acl_file)
 The name of the Access Control List file. More...
 
const std::string & acl_file () const
 Getter (see setter with the same name). More...
 
ServiceProperty & create_api_key (const std::string &api_key)
 Add a new api key to the list of api keys. More...
 
const std::string & create_api_key () const
 Getter (see setter with the same name). More...
 
ServiceProperty & list_api_keys (bool value)
 Set it to true to list all the API keys available in an Access Control List file. More...
 
ServiceProperty & delete_api_key (const std::string &api_key)
 Delete an api key from the list of api keys. More...
 
const std::string & delete_api_key () const
 Getter (see setter with the same name). More...
 
ServiceProperty & max_objects_per_thread (int max_objects_per_thread)
 Use this attribute to increase the maximum number of objects per thread of RTI Data Distribution Service. More...
 
int max_objects_per_thread ()
 Getter (see setter with the same name). More...
 
ServiceProperty & setup_verbosity_level (int verbosity_level)
 Controls what type of messages are logged. More...
 
ServiceProperty & setup_verbosity_level ()
 Set the up verbosity level that is in verbosity_ atributte. More...
 
void install_logger ()
 
void uninstall_logger ()
 

Detailed Description

Configuration properties for a RTI Web Integration Service object.

Constructor & Destructor Documentation

◆ ServiceProperty()

rti::webdds::ServiceProperty::ServiceProperty ( )

Construct a new Service Property object.

◆ ~ServiceProperty()

rti::webdds::ServiceProperty::~ServiceProperty ( )

Destroy the Service Property object.

Member Function Documentation

◆ enable_builtin_topics() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::enable_builtin_topics ( bool  value)

Set it to true to enable the Builtin Topics REST API.

Allows clients to read discovery information through the Builtin Topics.

[default] false

◆ enable_builtin_topics() [2/2]

bool rti::webdds::ServiceProperty::enable_builtin_topics ( ) const

Getter (see setter with the same name).

◆ enable_websockets() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::enable_websockets ( bool  value)

Set it to true to enable the WebSockets REST API.

Allows clients to read/write data through WebSockets.

[default] false

◆ enable_websockets() [2/2]

bool rti::webdds::ServiceProperty::enable_websockets ( ) const

Getter (see setter with the same name).

◆ list_api_keys() [1/2]

bool rti::webdds::ServiceProperty::list_api_keys ( ) const

Getter (see setter with the same name).

◆ enable_resource_caching() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::enable_resource_caching ( bool  value)

Caches entities thread-specific storage.

Caches WaitSet, Sample Buffer, and DynamicData objects in the thread-specific storage of the worker threads that handle HTTP requests.

You can limit the allocated resources by reducing the number of worker threads via the set_webserver_option() method and setting the option "num_threads"

[default] false

◆ enable_resource_caching() [2/2]

bool rti::webdds::ServiceProperty::enable_resource_caching ( ) const

Getter (see setter with the same name).

◆ use_custom_logger() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::use_custom_logger ( bool  value)

Enables the use of a custom logger.

[default] false

◆ use_custom_logger() [2/2]

bool rti::webdds::ServiceProperty::use_custom_logger ( ) const

Getter (see setter with the same name).

◆ webserver_option()

const std::string * rti::webdds::ServiceProperty::webserver_option ( const std::string &  option) const

Get the value of the webserver option.

Parameters
optionOption name of the value to get.
Returns
Pointer to the value if it exists. nullptr otherwise.

◆ webserver_options()

const std::vector< std::string > & rti::webdds::ServiceProperty::webserver_options ( ) const

This method return the webserver_options_ array. the values are used as pairs of key-value each 2 values.

Returns
const std::vector<std::string>&

◆ cfgfile() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::cfgfile ( const std::string &  cfgfile)

Specifies a configuration file to be loaded.

[default] Empty string

◆ cfgfile() [2/2]

const std::string & rti::webdds::ServiceProperty::cfgfile ( ) const

Getter (see setter with the same name).

◆ cfgname() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::cfgname ( const std::string &  cfgname)

The name of the RTI Web Integration Service configuration to run.

Web Integration Service will look for a matching <web_integration_service> tag in the configuration file specified via the cfg_file() method and in the default configuration files.

[default] Empty string

◆ cfgname() [2/2]

const std::string & rti::webdds::ServiceProperty::cfgname ( ) const

Getter (see setter with the same name).

◆ acl_file() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::acl_file ( const std::string &  acl_file)

The name of the Access Control List file.

This parameter loads an Access Control List file, which enables access control in all the HTTP requests and WebSocket (WS) connections. It is recommended to use this parameter with a secured connection; i.e., it is important to enable HTTPS and Secure WebSocket (WSS) in every single listening_ports and provide an -sslCertificate.

[default] Empty string

◆ acl_file() [2/2]

const std::string & rti::webdds::ServiceProperty::acl_file ( ) const

Getter (see setter with the same name).

◆ create_api_key() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::create_api_key ( const std::string &  api_key)

Add a new api key to the list of api keys.

[default] Empty string

◆ create_api_key() [2/2]

const std::string & rti::webdds::ServiceProperty::create_api_key ( ) const

Getter (see setter with the same name).

◆ list_api_keys() [2/2]

ServiceProperty & rti::webdds::ServiceProperty::list_api_keys ( bool  value)

Set it to true to list all the API keys available in an Access Control List file.

This method must be used in combination with the acl_file method to specify the file from which API keys should be listed.

[default] false

◆ delete_api_key() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::delete_api_key ( const std::string &  api_key)

Delete an api key from the list of api keys.

[default] Empty string

◆ delete_api_key() [2/2]

const std::string & rti::webdds::ServiceProperty::delete_api_key ( ) const

Getter (see setter with the same name).

◆ max_objects_per_thread() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::max_objects_per_thread ( int  max_objects_per_thread)

Use this attribute to increase the maximum number of objects per thread of RTI Data Distribution Service.

[default] 1024

◆ max_objects_per_thread() [2/2]

int rti::webdds::ServiceProperty::max_objects_per_thread ( )

Getter (see setter with the same name).

◆ setup_verbosity_level() [1/2]

ServiceProperty & rti::webdds::ServiceProperty::setup_verbosity_level ( int  verbosity_level)

Controls what type of messages are logged.

The available levels are:

0. Silent

  1. Exceptions (Connext DDS and Web Integration Service)
  2. Warnings (Web Integration Service)
  3. Information (Web Integration Service)
  4. Warnings (Connext DDS and Web Integration Service)
  5. Tracing (Web Integration Service)
  6. Tracing (Connext DDS and Web Integration Service)

Each verbosity level includes all the previous levels.

[default] false

◆ setup_verbosity_level() [2/2]

ServiceProperty & rti::webdds::ServiceProperty::setup_verbosity_level ( )

Set the up verbosity level that is in verbosity_ atributte.

◆ install_logger()

void rti::webdds::ServiceProperty::install_logger ( )

This method installs the custom logger, which enables the user to store logging messages in the thread-specific storage to be able to send them in HTTP responses.

◆ uninstall_logger()

void rti::webdds::ServiceProperty::uninstall_logger ( )

This method uninstalls the custom logger.