RTI Connext Java API  Version 5.1.0
FooTypeSupport Class Reference

<<interface>> <<generic>> User data type specific interface. More...

Inherits TypeSupportImpl.

Public Member Functions

Object copy_data (Object destination, Object source)
 

Static Public Member Functions

static String get_type_name ()
 Get the default name for this type.
 
static void register_type (DomainParticipant participant, String type_name)
 Allows an application to communicate to RTI Connext the existence of a data type.
 

Detailed Description

<<interface>> <<generic>> User data type specific interface.

Defines the user data type specific interface generated for each application class.

The concrete user data type automatically generated by the implementation is an incarnation of this class.

See Also
rtiddsgen

Member Function Documentation

static String get_type_name ( )
static

Get the default name for this type.

Can be used for calling com.rti.ndds.example.FooTypeSupport.register_type or creating com.rti.dds.topic.Topic

Returns
default name for this type
See Also
com.rti.ndds.example.FooTypeSupport.register_type
com.rti.dds.domain.DomainParticipant.create_topic
static void register_type ( DomainParticipant  participant,
String  type_name 
)
static

Allows an application to communicate to RTI Connext the existence of a data type.

The generated implementation of the operation embeds all the knowledge that has to be communicated to the middleware in order to make it able to manage the contents of data of that type. This includes in particular the key definition that will allow RTI Connext to distinguish different instances of the same type.

The same com.rti.dds.topic.TypeSupport can be registered multiple times with a com.rti.dds.domain.DomainParticipant using the same or different values for the type_name. If register_type is called multiple times on the same com.rti.dds.topic.TypeSupport with the same com.rti.dds.domain.DomainParticipant and type_name, the second (and subsequent) registrations are ignored by the operation fails with com.rti.dds.infrastructure.RETCODE_OK.

Precondition
Cannot use the same type_name to register two different com.rti.dds.topic.TypeSupport with the same com.rti.dds.domain.DomainParticipant, or else the operation will fail and com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET will be returned.
Parameters
participant<<in>> the com.rti.dds.domain.DomainParticipant to register the data type Foo with. Cannot be NULL.
type_name<<in>> the type name under with the data type Foo is registered with the participant; this type name is used when creating a new com.rti.dds.topic.Topic. (See com.rti.dds.domain.DomainParticipant.create_topic.) The name may not be NULL or longer than 255 characters.
Exceptions
Oneof the Standard Return Codes, com.rti.dds.infrastructure.RETCODE_PRECONDITION_NOT_MET or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES.
MT Safety:
UNSAFE on the FIRST call. It is not safe for two threads to simultaneously make the first call to register a type. Subsequent calls are thread safe.
See Also
com.rti.dds.domain.DomainParticipant.create_topic
Object copy_data ( Object  destination,
Object  source 
)

This is a concrete implementation of this method inherited from the base class. This method will perform a deep copy of source into destination.

Parameters
sourceThe Object which contains the data to be copied.
destinationThe object where data will be copied to.
Returns
Returns destination.
Exceptions
NullPointerExceptionIf destination or source is null.
ClassCastExceptionIf either destination or this is not a Foo type.

RTI Connext Java API Version 5.1.0 Copyright © Mon Feb 3 2014 Real-Time Innovations, Inc