PrivMX DOCS
API Reference/PrivMX Endpoint Java Extra/Core

PrivmxEndpoint

Extends BasicPrivmxEndpoint with event callbacks dispatcher.

Constructors

PrivmxEndpoint

Calls BasicPrivmxEndpoint#BasicPrivmxEndpoint(Set, String, String, String).

Params

enableModule

Set<Modules>

set of modules to initialize; should contain Modules#THREAD to enable Thread module or Modules#STORE to enable Store module

userPrivateKey

String

user private key used to authorize; generated from: CryptoApi#generatePrivateKey or CryptoApi#derivePrivateKey

solutionId

String

SolutionId of the current project

bridgeUrl

String

Bridge Server URL

public void PrivmxEndpoint(
Set<Modules> enableModule,
String userPrivateKey,
String solutionId,
String bridgeUrl
)

Methods

handleEvent

Handles event and invokes all related callbacks. It should only be called by event loops.

Params

event

Event<?>

event to handle

public void handleEvent(
Event<?> event
)

registerCallback

Registers callbacks with the specified type.

Params

context

Object

an object that identifies callbacks in the list

eventType

EventType<T>

type of event to listen to

callback

EventCallback<T>

a block of code to execute when event was handled

public final <T> void registerCallback(
Object context,
EventType<T> eventType,
EventCallback<T> callback
)

unregisterAll

Unregisters all callbacks registered by #registerCallback(Object, EventType, EventCallback).

public void unregisterAll()

unregisterCallbacks

Unregisters all callbacks registered by #registerCallback(Object, EventType, EventCallback) and identified with given Context.

Params

context

Object

an object that identifies callbacks in the list.

public void unregisterCallbacks(
Object context
)

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.

PrivMX Endpoint Java v2.3

This package is not up to date with the core documentation. Some of the features you've seen described in other parts of the documentation might not be mentioned here. Those changes do not influence compatibility, however