RTI Connext Java API  Version 6.1.1

Network Capture APIs. More...

Static Public Member Functions

static native boolean enable ()
 Enable Network Capture. More...
 
static native boolean disable ()
 Disable Network Capture. More...
 
static boolean set_default_params (NetworkCaptureParams params)
 Set the default Network Capture parameters. More...
 
static native boolean start (String filename)
 Start capturing traffic for all DomainParticipants, with the default parameters. More...
 
static boolean start (DomainParticipant participant, String filename)
 Start capturing traffic for a DomainParticipant, with the default parameters. More...
 
static boolean start (String filename, NetworkCaptureParams params)
 Start capturing traffic for all DomainParticipants, with the provided parameters. More...
 
static boolean start (DomainParticipant participant, String filename, NetworkCaptureParams params)
 Start capturing traffic for a DomainParticipant, with the provided parameters. More...
 
static native boolean stop ()
 Stop capturing traffic for all participants. More...
 
static boolean stop (DomainParticipant participant)
 Stop capturing traffic for a DomainParticipant. More...
 
static native boolean pause ()
 Pause capturing traffic for all DomainParticipants. More...
 
static boolean pause (DomainParticipant participant)
 Pause capturing traffic for a DomainParticipant. More...
 
static native boolean resume ()
 Resume capturing traffic for all DomainParticipants. More...
 
static boolean resume (DomainParticipant participant)
 Resume capturing traffic for a DomainParticipant. More...
 

Detailed Description

Network Capture APIs.

Member Function Documentation

◆ enable()

static native boolean enable ( )
static

Enable Network Capture.

This method must be called before any other Network Capture method. It must also be called before creating the participants for which we want to capture traffic.

Use this method only for debugging purposes, since it may introduce a significant performance impact.

Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
MT Safety:
UNSAFE. It is not safe to call this method while another thread may be simultaneously calling another Network Caputre related method, including this one.
MT Safety:
UNSAFE. In VxWorks, it is unsafe to call this method while another thread may be simulatenously calling com.rti.dds.domain.DomainParticipantFactory.get_instance, com.rti.dds.domain.DomainParticipantFactory.finalize_instance, com.rti.dds.typecode.TypeCodeFactory.get_instance, com.rti.ndds.utility.NetworkCapture.enable, or com.rti.ndds.utility.NetworkCapture.disable.
See also
com.rti.ndds.utility.NetworkCapture.disable

◆ disable()

static native boolean disable ( )
static

Disable Network Capture.

This method must be the last Network Capture method to be called. It must also be called after deleting the participants for which we captured traffic. Disabling Network Capture without stopping it first is not ok!

Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
MT Safety:
UNSAFE. It is not safe to call this method while another thread may be simultaneously calling another Network Capture related method, including this one.
MT Safety:
UNSAFE. In VxWorks, it is unsafe to call this method while another thread may be simulatenously calling com.rti.dds.domain.DomainParticipantFactory.get_instance, com.rti.dds.domain.DomainParticipantFactory.finalize_instance, com.rti.dds.typecode.TypeCodeFactory.get_instance, com.rti.ndds.utility.NetworkCapture.enable, or com.rti.ndds.utility.NetworkCapture.disable.
See also
com.rti.ndds.utility.NetworkCapture.enable

◆ set_default_params()

static boolean set_default_params ( NetworkCaptureParams  params)
static

Set the default Network Capture parameters.

The default parameters are used when Network Capture is started without parameters, i.e., com.rti.ndds.utility.NetworkCapture.start.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Parameters
params<<in>>. Configuration parameters that we want to set as defaults.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.start
com.rti.ndds.utility.NetworkCapture.start(DomainParticipant, String)

References NetworkCapture.start().

◆ start() [1/4]

static native boolean start ( String  filename)
static

Start capturing traffic for all DomainParticipants, with the default parameters.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Parameters
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, the "_GUID-" string followed by the decimal representation of bytes 8-11 of the DomainParticipant's GUID, and the file extension (".pcap").

Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.stop
com.rti.ndds.utility.NetworkCapture.start(DomainParticipant, String)

Referenced by NetworkCapture.set_default_params().

◆ start() [2/4]

static boolean start ( DomainParticipant  participant,
String  filename 
)
static

Start capturing traffic for a DomainParticipant, with the default parameters.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Parameters
participant<<in>>. DomainParticipant for which we want to capture traffic.
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, and the file extension (".pcap").

Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.stop(DomainParticipant)
com.rti.ndds.utility.NetworkCapture.start(DDS:DomainParticipant^, System::String^, NetworkCaptureParams)
com.rti.ndds.utility.NetworkCapture.enable

◆ start() [3/4]

static boolean start ( String  filename,
NetworkCaptureParams  params 
)
static

Start capturing traffic for all DomainParticipants, with the provided parameters.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.

Perfoms the same function as com.rti.ndds.utility.NetworkCapture.start except that it uses the provided parameters, instead of the default ones.

Parameters
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, the "_GUID-" string followed by the decimal representation of bytes 8-11 of the DomainParticipant's GUID, and the file extension (".pcap").

Parameters
params<<in>>. Configuration parameters for the capture.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.stop
com.rti.ndds.utility.NetworkCapture.start(DDS:DomainParticipant^, System::String^, NetworkCaptureParams)

◆ start() [4/4]

static boolean start ( DomainParticipant  participant,
String  filename,
NetworkCaptureParams  params 
)
static

Start capturing traffic for a DomainParticipant, with the provided parameters.

Precondition
This method requires enabling first Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Parameters
participant<<in>>. DomainParticipant for which we want to capture traffic.
filename<<in>>. The name of the output capture file will be based on this input parameter.

In particular, the name for the capture file is the concatenation of the filename input parameter, and the file extension (".pcap").

Parameters
params<<in>>. Parameters for configuring the capture.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.stop(DomainParticipant)
com.rti.ndds.utility.NetworkCapture.start(DomainParticipant, String)

References NetworkCapture.stop().

◆ stop() [1/2]

static native boolean stop ( )
static

Stop capturing traffic for all participants.

Precondition
This method requires enabling first Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.

This method can (and must) be called after com.rti.ndds.utility.NetworkCapture.start, not com.rti.ndds.utility.NetworkCapture.start(DomainParticipant, String). That is, if we start capturing traffic globally (for all DomainParticipants), we must stop capturing traffic also globally. It is not possible to start capturing traffic for a participant but stop it globally.

It is possible to start capturing globally and then stop capturing for a participant, as long as we eventually stop capturing traffic globally.

We must stop capturing for a participant before deleting it.

Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.start
com.rti.ndds.utility.NetworkCapture.stop(DomainParticipant)

Referenced by NetworkCapture.start().

◆ stop() [2/2]

static boolean stop ( DomainParticipant  participant)
static

Stop capturing traffic for a DomainParticipant.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Parameters
participant<<in>>. DomainParticipant for which we want to stop capturing traffic.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.start(DomainParticipant, String)
com.rti.ndds.utility.NetworkCapture.stop

References NetworkCapture.pause().

◆ pause() [1/2]

static native boolean pause ( )
static

Pause capturing traffic for all DomainParticipants.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.resume
com.rti.ndds.utility.NetworkCapture.pause(DomainParticipant)

Referenced by NetworkCapture.stop().

◆ pause() [2/2]

static boolean pause ( DomainParticipant  participant)
static

Pause capturing traffic for a DomainParticipant.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Parameters
participant<<in>>. DomainParticipant for which we want to pause capturing traffic.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.resume(DomainParticipant)
com.rti.ndds.utility.NetworkCapture.pause

References NetworkCapture.resume().

◆ resume() [1/2]

static native boolean resume ( )
static

Resume capturing traffic for all DomainParticipants.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.pause
com.rti.ndds.utility.NetworkCapture.resume(DomainParticipant)

Referenced by NetworkCapture.pause().

◆ resume() [2/2]

static boolean resume ( DomainParticipant  participant)
static

Resume capturing traffic for a DomainParticipant.

Precondition
This method requires first enabling Network Capture. See com.rti.ndds.utility.NetworkCapture.enable.
Parameters
participant<<in>>. DomainParticipant for which we want to resume capturing traffic.
Returns
com.rti.dds.infrastructure.true if success. Otherwise, com.rti.dds.infrastructure.false
See also
com.rti.ndds.utility.NetworkCapture.pause(DomainParticipant)
com.rti.ndds.utility.NetworkCapture.resume