RTI Connext Java API  Version 5.3.1
 All Classes Namespaces Functions Variables Groups Pages
PropertyQosPolicyHelper Class Reference

Policy Helpers which facilitate management of the properties in the input policy. More...

Static Public Member Functions

static int get_number_of_properties (PropertyQosPolicy policy)
 Gets the number of properties in the input policy.
 
static void assert_property (PropertyQosPolicy policy, String name, String value, boolean propagate)
 Asserts the property identified by name in the input policy.
 
static void add_property (PropertyQosPolicy policy, String name, String value, boolean propagate)
 Adds a new property to the input policy.
 
static Property_t lookup_property (PropertyQosPolicy policy, String name)
 Searches for a property in the input policy given its name.
 
static void remove_property (PropertyQosPolicy policy, String name)
 Removes a property from the input policy.
 
static void get_properties (PropertyQosPolicy policy, PropertySeq properties, String name_prefix)
 Retrieves a list of properties whose names match the input prefix.
 
static void configure_pki_secure_transport_properties (PropertyQosPolicy policy, String transport_plugin_prefix, java.security.cert.Certificate[] root_ca_certificates, java.security.cert.Certificate[] certificate_chain, java.security.PrivateKey private_key)
 Configures the public-key infrastructure elements required by a secure transport specified by its prefix.
 
static int get_qos_resource_limits_property_string_max_length (PropertyQosPolicy policy)
 Returns the maximum cumulative string length of all the properties within the specified policy.
 

Detailed Description

Policy Helpers which facilitate management of the properties in the input policy.

Member Function Documentation

static int get_number_of_properties ( PropertyQosPolicy  policy)
static

Gets the number of properties in the input policy.

Precondition
policy cannot be null.
Parameters
policy<<in>> Input policy.
Returns
Number of properties.
static void assert_property ( PropertyQosPolicy  policy,
String  name,
String  value,
boolean  propagate 
)
static

Asserts the property identified by name in the input policy.

If the property already exists, this function replaces its current value with the new one.

If the property identified by name does not exist, this function adds it to the property set.

This function increases the maximum number of elements of the policy sequence when this number is not enough to store the new property.

Precondition
policy, name and value cannot be null.
Parameters
policy<<in>> Input policy.
name<<in>> Property name.
value<<in>> Property value.
propagate<<in>> Indicates if the property will be propagated on discovery.
Returns
One of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES.
static void add_property ( PropertyQosPolicy  policy,
String  name,
String  value,
boolean  propagate 
)
static

Adds a new property to the input policy.

This function will allocate memory to store the (name,value) pair. The memory allocated is owned by RTI Connext.

If the maximum number of elements of the policy sequence is not enough to store the new property, this function will increase it.

If the property already exists the function fails with com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET.

Precondition
policy, name and value cannot be null.
The property is not in the policy.
Parameters
policy<<in>> Input policy.
name<<in>> Property name.
value<<in>> Property value.
propagate<<in>> Indicates if the property will be propagated on discovery.
Returns
One of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES or com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET
static Property_t lookup_property ( PropertyQosPolicy  policy,
String  name 
)
static

Searches for a property in the input policy given its name.

Precondition
policy, name and value cannot be null.
Parameters
policy<<in>> Input policy.
name<<in>> Property name.
Returns
On success, the function returns the first property with the given name. Otherwise, the function returns NULL.
static void remove_property ( PropertyQosPolicy  policy,
String  name 
)
static

Removes a property from the input policy.

If the property does not exist, the function fails with com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET.

Precondition
policy and name cannot be null.
The property is in the policy.
Parameters
policy<<in>> Input policy.
name<<in>> Property name.
Returns
One of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET.
static void get_properties ( PropertyQosPolicy  policy,
PropertySeq  properties,
String  name_prefix 
)
static

Retrieves a list of properties whose names match the input prefix.

If the properties sequence doesn't own its buffer, and its maximum is less than the total number of properties matching the input prefix, it will be filled up to its maximum and fail with an error of com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES.

Precondition
policy, properties and name_prefix cannot be null.
Parameters
policy<<in>> Input policy.
properties<<inout>> A com.rti.dds.infrastructure.PropertySeq object where the set or list of properties will be returned.
name_prefixName prefix.
Returns
One of the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES.
static void configure_pki_secure_transport_properties ( PropertyQosPolicy  policy,
String  transport_plugin_prefix,
java.security.cert.Certificate[]  root_ca_certificates,
java.security.cert.Certificate[]  certificate_chain,
java.security.PrivateKey  private_key 
)
static

Configures the public-key infrastructure elements required by a secure transport specified by its prefix.

This operation asserts the necessary set of properties that specify public-key elements required by a secure transport. These elements are the root CA certificates, the identifying certificate chain and the private key.

The operation sets the corresponding properties for each of these public-key elements, replacing an existing property if present in the policy. The set of properties contain both certificates and private key in PEM format.

These properties are:

  • root_ca_certificates: <transport_plugin_prefix>.tls.verify.ca
  • certificate_chain: <transport_plugin_prefix>.tls.identity.certificate_chain
  • private_key <transport_plugin_prefix>.tls.identity.private_ky

The properties are asserted with the propagate option set to false;

The supported secure transport plugins are:

  • RTI Secure TCP Transport (TCP + TLS). Library: nddstransporttcp
  • RTI Secure WAN Transport (UDP + Stun + DTLS). Library: nddstransportwan
  • RTI Secure Transport (UDP + DTLS). Library: nddstransporttls
Parameters
policy<<inout>> Policy to be populated.
transport_plugin_prefix<<in>> Plugin prefix that is given to the transport plugin when the plugin is loaded. This is done by setting the property 'dds.transport.load_plugins'.
root_ca_certificates<<in>> List of CA certificates that will be used to verify the validity of the identifying certificate chain. At least one root CA certificate is required.
certificate_chain<<in>> Identifying certificate chain. At least one identifying certificate is required.
private_key<<in>> Private key associated to the public key of the identifying certificates and that is required for the authentication process. It must be unencrypted.
Returns
com.rti.dds.infrastructure.RETCODE_ERROR.
static int get_qos_resource_limits_property_string_max_length ( PropertyQosPolicy  policy)
static

Returns the maximum cumulative string length of all the properties within the specified policy.

This operation computes the total cumulative length of the properties. This represents the minimum value that must be set in the resource limits qos so that it is consistent.


RTI Connext Java API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc