PrivMX DOCS
API Reference/PrivMX Endpoint Java Extra/Core

CallbackRegistration

Represents a registration of a callback for a specific event type. This class encapsulates the information needed to register and subscribe a callback.

Constructors

CallbackRegistration

Creates a new callback registration instance. This constructor is used to define a specific callback that should be executed when an event of a particular type occurs. Callbacks are grouped for easier management, such as unregistering multiple related callbacks at once.

Params

callbackGroup

Object

An identifier used to group related callbacks. This allows for collective operations, like unregistering all callbacks belonging to the same group. Can be any object, its identity (reference equality) is used for grouping.

eventType

EventType<T>

The specific type of event to subscribe to. The provided callback will only be invoked for events matching this type.

callback

EventCallback<T>

The EventCallback instance that will be executed when an event of the specified eventType is handled. This callback will receive the event data as a parameter.

public void CallbackRegistration(
Object callbackGroup,
EventType<T> eventType,
EventCallback<T> callback
)

Fields

callback

EventCallback<T> The block of code that will be executed when an event of the specified #eventType is handled.

callbackGroup

Object An identifier used to group related callbacks.

eventType

EventType<T> The specific type of event to subscribe to.

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.