TSDuck Version 3.29-2562 (TSDuck - The MPEG Transport Stream Toolkit)
io.tsduck.AbstractPluginEventHandler Class Referenceabstract

An abstract class which can be derived by applications to get plugin events. More...

Inheritance diagram for io.tsduck.AbstractPluginEventHandler:
Collaboration diagram for io.tsduck.AbstractPluginEventHandler:

Public Member Functions

native void delete ()
 Delete the encapsulated C++ object.
 
abstract boolean handlePluginEvent (PluginEventContext context, byte[] data)
 This handler is invoked when a plugin signals an event for which this object is registered. More...
 

Protected Member Functions

 AbstractPluginEventHandler ()
 Constructor (for subclasses).
 

Protected Attributes

long nativeObject = 0
 The address of the underlying C++ object. More...
 

Detailed Description

An abstract class which can be derived by applications to get plugin events.

Member Function Documentation

◆ handlePluginEvent()

abstract boolean io.tsduck.AbstractPluginEventHandler.handlePluginEvent ( PluginEventContext  context,
byte[]  data 
)
abstract

This handler is invoked when a plugin signals an event for which this object is registered.

The application should override it to collect the event.

The associated input event data is passed in data. If context.readOnlyData() is false, it is possible to update the data. This is typically the case with the memory input plugin which signals events with empty input data and expects TS packets as returned data. The updated data, if any, should be set by the handler using context.setOutputData(). The size of the returned data shall not exceed context.maxDataSize(). Otherwise, it will be ignored.

Parameters
contextAn instance of PluginEventContext containing the details of the event.
dataA byte array containing the data of the event. This is a read-only sequence of bytes. There is no way to return data from Java to the plugin.
Returns
True in case of success, false to set the error indicator of the event.

Member Data Documentation

◆ nativeObject

long io.tsduck.NativeObject.nativeObject = 0
protectedinherited

The address of the underlying C++ object.

It is normally accessed by native methods only.


The documentation for this class was generated from the following file: