RTI Routing Service  Version 5.3.0
 All Classes Files Functions Variables Groups
Adapter Interface Reference

Adapter interface (required). More...

Public Member Functions

Connection createConnection (String routingServiceName, String routingServiceGroupName, StreamReaderListener inputStreamDiscoveryListener, StreamReaderListener outputStreamDiscoveryListener, Properties properties) throws AdapterException
 Creates a Connection.
 
void deleteConnection (Connection connection) throws AdapterException
 Deletes a Connection.
 
Version getVersion ()
 Returns the version of this adapter plugin.
 

Detailed Description

Adapter interface (required).

Java adapters are registered with RTI Routing Service using the XML tag <java_adapter_plugin>

For example:

<dds>
    ...
    <adapter_library name="MyAdapterLib">
        <java_adapter_plugin name="MyAdapterPlugin">
            <class_name>com.rti.adapters.MyAdapter</class_name>
        </java_adapter_plugin>
        ...
    </adapter_library>
    ...
    <routing_service>
    ...
    </routing_service>
    ...
</dds>

In the above example, the interface is implemented by the com.rti.adapters.MyAdapter class.

When RTI Routing Service creates a Java adapter, it uses a constructor with one java.lang.Properties parameter. Those properties contain the configuration of the adapter and, in addition, two special properties:

  • Property rti.routingservice.version whose value represents the RTI Routing Service version
  • Property rti.routingservice.verbosity whose value represents the verbosity in use by RTI Routing Service and is one of the following strings: none, exception, warn, info, debug.

If that constructor is not found the constructor with no parameters is used instead.

Member Function Documentation

Connection createConnection ( String  routingServiceName,
String  routingServiceGroupName,
StreamReaderListener  inputStreamDiscoveryListener,
StreamReaderListener  outputStreamDiscoveryListener,
Properties  properties 
) throws AdapterException

Creates a Connection.

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

Connection objects are created when the domain routes that contain them are enabled.

In the XML configuration file, Connections are associated with the tags <connection_1> and <connection_2> within a domain route.

Parameters
routingServiceName<<in>> The routing service execution name.
routingServiceGroupName<<in>> The group name of the routing service execution.
inputStreamDiscoveryListener<<in>> The listener of the built-in StreamReader that notifies the discovery of new input streams.
outputStreamDiscoveryListener<<in>> The listener of the built-in StreamReader that notifies the discovery of new output streams.
Parameters
properties<<in>> Configuration properties for the Connection.
Returns
New Connection if successful.
Exceptions
AdapterException- if an error occurs.
See Also
com.rti.routingservice.adapter.Adapter.deleteConnection
void deleteConnection ( Connection  connection) throws AdapterException

Deletes a Connection.

Connection objects are deleted when the domain routes that contain them are disabled or RTI Routing Service is closed.

Parameters
connection<<in>> Connection to be deleted
Exceptions
AdapterException- if an error occurs.
See Also
com.rti.routingservice.adapter.Adapter.createConnection
Version getVersion ( )

Returns the version of this adapter plugin.


RTI Routing Service Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc