RTI Routing Service  Version 6.0.0
 All Data Structures Files Functions Typedefs Enumerations Enumerator Groups Pages
rti::routing::adapter::Connection Class Referenceabstract

A Connection provides access to a data domain (such as a DDS domain or a JMS network provider). More...

#include <Connection.hpp>

Inheritance diagram for rti::routing::adapter::Connection:
rti::routing::UpdatableEntity

Public Member Functions

virtual Sessioncreate_session (const PropertySet &properties)
 Creates a Session.
 
virtual void delete_session (Session *session)
 Deletes a Session.
 
virtual StreamWritercreate_stream_writer (Session *session, const StreamInfo &stream_info, const PropertySet &properties)=0
 Creates a StreamWriter.
 
virtual void delete_stream_writer (StreamWriter *stream_writer)=0
 Deletes a StreamWriter.
 
virtual StreamReadercreate_stream_reader (Session *session, const StreamInfo &stream_info, const PropertySet &properties, StreamReaderListener *listener)=0
 Creates a StreamReader.
 
virtual void delete_stream_reader (StreamReader *stream_reader)=0
 Deletes a StreamReader.
 
virtual DiscoveryStreamReaderinput_stream_discovery_reader ()
 Gets the input stream discovery StreamReader.
 
virtual DiscoveryStreamReaderoutput_stream_discovery_reader ()
 Gets the output stream discovery StreamReader.
 
virtual ~Connection ()
 Virtual destructor.
 
- Public Member Functions inherited from rti::routing::UpdatableEntity
virtual void update (const std::map< std::string, std::string > &properties)
 Updates a pluggable entity.
 
virtual ~UpdatableEntity ()
 Virtual destructor.
 

Detailed Description

A Connection provides access to a data domain (such as a DDS domain or a JMS network provider).

In the XML configuration file, Connections are associated with the tag <connection> within a domain route.

Constructor & Destructor Documentation

virtual rti::routing::adapter::Connection::~Connection ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

virtual Session* rti::routing::adapter::Connection::create_session ( const PropertySet properties)
inlinevirtual

Creates a Session.

Session objects are created when the associated RTI Routing Service Sessions are enabled. This operation is called once for each service Session and for each Connection within the DomainRoute.

Parameters
properties<<in>> Configuration properties for the Session.
Returns
New Session if successful. Can return nullptr if sessions are not required by this AdapterPlugin.
Exceptions
std::exception
Multi-threading safety:
Safe
virtual void rti::routing::adapter::Connection::delete_session ( Session session)
inlinevirtual

Deletes a Session.

Session objects are deleted when the RTI Routing Service Sessions that contain them are disabled.

Parameters
session<<in>> Session to be deleted.
Exceptions
std::exception
Multi-threading safety:
Safe
virtual StreamWriter* rti::routing::adapter::Connection::create_stream_writer ( Session session,
const StreamInfo stream_info,
const PropertySet properties 
)
pure virtual

Creates a StreamWriter.

This method is called for each Route's output when the associated 'creation mode' condition is met. The operation is called on the output Connection as a specified through the 'connection' attribute in the <output> tag.

Parameters
session<<in>> Session associated with the StreamWriter. This parameter is nullptr if Sessions are not used by the adapter.
stream_info<<in>> Information related to the stream where the StreamWriter sends data.
properties<<in>> Configuration properties for the StreamWriter.
Returns
New StreamWriter if successful. Cannot return nullptr
Exceptions
std::exception
Multi-threading safety:
Partially Safe. This operation is never called concurrently for the same Connection, even if multiple outputs are configured in different Sessions. It can only be called concurrently for different Connections.
virtual void rti::routing::adapter::Connection::delete_stream_writer ( StreamWriter stream_writer)
pure virtual

Deletes a StreamWriter.

A StreamWriter object is deleted when:

  • The route that contains it is disabled
  • The 'creation mode' condition associated with the route's output becomes false
  • RTI Routing Service is shutdown.
Parameters
stream_writer<<in>> StreamWriter to be deleted.
Exceptions
std::exception
virtual StreamReader* rti::routing::adapter::Connection::create_stream_reader ( Session session,
const StreamInfo stream_info,
const PropertySet properties,
StreamReaderListener listener 
)
pure virtual

Creates a StreamReader.

This method is called for each Route's input when the associated 'creation mode' condition is met. The operation is called on the input Connection as a specified through the 'connection' attribute in the <output> tag.

Parameters
session<<in>> Session associated with the StreamReader. This parameter is nullptr if Sessions are not used by the adapter.
stream_info<<in>> Information related to the stream where the StreamReader read data.
properties<<in>> Configuration properties for the StreamReader.
listener<<in>> The listener for the StreamReader implementation used to notify RTI Routing Service when new data is available.
Returns
New StreamReader if successful. Cannot return nullptr.
Exceptions
std::exception
Multi-threading safety:
Partially Safe. This operation is never called concurrently for the same Connection, even if multiple outputs are configured in different Sessions. It can only be called concurrently for different Connections.
virtual void rti::routing::adapter::Connection::delete_stream_reader ( StreamReader stream_reader)
pure virtual

Deletes a StreamReader.

A StreamReader object is deleted when:

  • The route that contains it is disabled
  • The 'creation mode' condition associated with the route's input becomes false
  • RTI Routing Service is shutdown.
Parameters
stream_reader<<in>> StreamReader to be deleted.
Exceptions
std::exception
virtual DiscoveryStreamReader* rti::routing::adapter::Connection::input_stream_discovery_reader ( )
inlinevirtual

Gets the input stream discovery StreamReader.

Returns a DiscoveryStreamReader that is used by RTI Routing Service to discover input streams.

An input stream is a stream from which a StreamReader can read data. Disposed scenarios, where an input stream disappears, are also notified using this DiscoveryStreamReader.

The StreamReaderListener associated with this DiscoveryStreamReader is provided as a parameter to the method AdapterPlugin::create_connection

Implementations may return nullptr if they do not support stream discovery.

Exceptions
std::exception
virtual DiscoveryStreamReader* rti::routing::adapter::Connection::output_stream_discovery_reader ( )
inlinevirtual

Gets the output stream discovery StreamReader.

Returns a DiscoveryStreamReader that is used by RTI Routing Service to discover output streams.

An output stream is a stream from which a StreamWrite can write data. Disposed scenarios, where an output stream disappears, are also notified using this DiscoveryStreamReader.

The StreamReaderListener associated with this DiscoveryStreamReader is provided as a parameter to the method AdapterPlugin::create_connection.

Implementations may return nullptr if they do not support stream discovery.

Exceptions
std::exception

RTI Routing Service Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc