PrivMX DOCS
API Reference/PrivMX Endpoint Java Extra/Core

EventType

Defines the structure to register PrivMX Bridge event callbacks

Fields

ConnectedEvent

EventType<Void> Predefined event type that captures successful platform connection events.

DisconnectedEvent

EventType<Void> Predefined event type to catch disconnection events.

LibBreakEvent

EventType<Void> Predefined event type to catch special events. This type could be used to emit/handle events with custom implementations (e.g. to break event loops).

channelName

String Channel name for a #ContextCustomEvent, otherwise null for other event types.

eventName

String Name of the event related to this EventType.

eventResultClass

Class<T> Type of the event data.

eventSelectorId

String Id of the chosen selector.

eventSelectorType

EventSelectorType Scope in which you listen for events.

libEventType

EventType The type of event to listen for.

Static Methods

CollectionChangedEvent

Returns instance to register for collection change events.

Params

selectorType

ThreadEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<CollectionChangedEventData> CollectionChangedEvent(
ThreadEventSelectorType selectorType,
String selectorId
)

Returns

EventType<CollectionChangedEventData> · Predefined event type to catch collection change events

CollectionChangedEvent

Returns instance to register for collection change events.

Params

selectorType

StoreEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<CollectionChangedEventData> CollectionChangedEvent(
StoreEventSelectorType selectorType,
String selectorId
)

Returns

EventType<CollectionChangedEventData> · Predefined event type to catch collection change events

CollectionChangedEvent

Returns instance to register for collection change events.

Params

selectorType

InboxEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<CollectionChangedEventData> CollectionChangedEvent(
InboxEventSelectorType selectorType,
String selectorId
)

Returns

EventType<CollectionChangedEventData> · Predefined event type to catch collection change events

CollectionChangedEvent

Returns instance to register for collection change events.

Params

selectorType

KvdbEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<CollectionChangedEventData> CollectionChangedEvent(
KvdbEventSelectorType selectorType,
String selectorId
)

Returns

EventType<CollectionChangedEventData> · Predefined event type to catch collection change events

ContextCustomEvent

Returns instance to register for custom Context Events.

Params

contextId

String

ID of the Context to observe

channelName

String

name of the Channel

public static EventType<ContextCustomEventData> ContextCustomEvent(
String contextId,
String channelName
)

Returns

EventType<ContextCustomEventData> · Predefined event type to catch emitted custom Context events

ContextUserAddedEvent

Returns instance to register for user added to the Context events.

Params

contextId

String

Context Id on which you listen for events

public static EventType<ContextUserEventData> ContextUserAddedEvent(
String contextId
)

Returns

EventType<ContextUserEventData> · Predefined event type to catch user added to the Context events

ContextUserRemovedEvent

Returns instance to register for user removed from the Context events.

Params

contextId

String

Context Id on which you listen for events

public static EventType<ContextUserEventData> ContextUserRemovedEvent(
String contextId
)

Returns

EventType<ContextUserEventData> · Predefined event type to catch user removed from the Context events

ContextUsersStatusChangeEvent

Returns instance to register for user status change events.

Params

contextId

String

Context Id on which you listen for events

public static EventType<ContextUsersStatusChangedEventData> ContextUsersStatusChangeEvent(
String contextId
)

Returns

EventType<ContextUsersStatusChangedEventData> · Predefined event type to catch user status change events

InboxCreatedEvent

Predefined event type to catch created Inbox events.

Params

contextId

String

Context Id on which you listen for events

public static EventType<Inbox> InboxCreatedEvent(
String contextId
)

Returns

EventType<Inbox> · Predefined event type to catch created Inbox events.

InboxDeletedEvent

Predefined event type to catch deleted Inbox events.

Params

selectorType

InboxEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<InboxDeletedEventData> InboxDeletedEvent(
InboxEventSelectorType selectorType,
String selectorId
)

Returns

EventType<InboxDeletedEventData> · Predefined event type to catch deleted Inbox events.

InboxEntryCreatedEvent

Returns instance to register on created entry Events.

Params

selectorType

InboxEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<InboxEntry> InboxEntryCreatedEvent(
InboxEventSelectorType selectorType,
String selectorId
)

Returns

EventType<InboxEntry> · Predefined event type to catch created entries in matching Inbox events

InboxEntryDeletedEvent

Returns instance to register on deleting entries Events.

Params

selectorType

InboxEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<InboxEntryDeletedEventData> InboxEntryDeletedEvent(
InboxEventSelectorType selectorType,
String selectorId
)

Returns

EventType<InboxEntryDeletedEventData> · Predefined event type to catch deleted entries in matching Inbox events

InboxUpdatedEvent

Predefined event type to catch updated Inbox events.

Params

selectorType

InboxEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<Inbox> InboxUpdatedEvent(
InboxEventSelectorType selectorType,
String selectorId
)

Returns

EventType<Inbox> · Predefined event type to catch updated Inbox events.

KvdbCreatedEvent

Predefined event type to catch created KVDB events.

Params

contextId

String

Context Id on which you listen for events

public static EventType<Kvdb> KvdbCreatedEvent(
String contextId
)

Returns

EventType<Kvdb> · Predefined event type to catch created KVDB events.

KvdbDeletedEvent

Predefined event type to catch deleted KVDB events.

Params

selectorType

KvdbEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<KvdbDeletedEventData> KvdbDeletedEvent(
KvdbEventSelectorType selectorType,
String selectorId
)

Returns

EventType<KvdbDeletedEventData> · Predefined event type to catch deleted KVDB events.

KvdbEntryDeletedEvent

Predefined event type to catch deleted KVDB entries events.

Params

selectorType

KvdbEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<KvdbDeletedEntryEventData> KvdbEntryDeletedEvent(
KvdbEventSelectorType selectorType,
String selectorId
)

Returns

EventType<KvdbDeletedEntryEventData> · Predefined event type to catch deleted KVDB entries events.

KvdbEntryUpdatedEvent

Predefined event type to catch updated KVDB entries events.

Params

selectorType

KvdbEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<KvdbEntry> KvdbEntryUpdatedEvent(
KvdbEventSelectorType selectorType,
String selectorId
)

Returns

EventType<KvdbEntry> · Predefined event type to catch updated KVDB entries events.

KvdbNewEntryEvent

Predefined event type to catch created KVDB entries events.

Params

selectorType

KvdbEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<KvdbEntry> KvdbNewEntryEvent(
KvdbEventSelectorType selectorType,
String selectorId
)

Returns

EventType<KvdbEntry> · Predefined event type to catch created KVDB entries events.

KvdbStatsChangedEvent

Predefined event type to catch updated KVDB stats events.

Params

selectorType

KvdbEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<KvdbStatsEventData> KvdbStatsChangedEvent(
KvdbEventSelectorType selectorType,
String selectorId
)

Returns

EventType<KvdbStatsEventData> · Predefined event type to catch updated KVDB stats events.

KvdbUpdatedEvent

Predefined event type to catch updated KVDB events.

Params

selectorType

KvdbEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<Kvdb> KvdbUpdatedEvent(
KvdbEventSelectorType selectorType,
String selectorId
)

Returns

EventType<Kvdb> · Predefined event type to catch updated KVDB events.

StoreCreatedEvent

Predefined event type to catch created Store events.

Params

contextId

String

Context Id on which you listen for events

public static EventType<Store> StoreCreatedEvent(
String contextId
)

Returns

EventType<Store> · Predefined event type to catch created Store events.

StoreDeletedEvent

Predefined event type to catch deleted Store events.

Params

selectorType

StoreEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<StoreDeletedEventData> StoreDeletedEvent(
StoreEventSelectorType selectorType,
String selectorId
)

Returns

EventType<StoreDeletedEventData> · Predefined event type to catch deleted Store events.

StoreFileCreatedEvent

Returns instance to register on created file Events.

Params

selectorType

StoreEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<File> StoreFileCreatedEvent(
StoreEventSelectorType selectorType,
String selectorId
)

Returns

EventType<File> · Predefined event type to catch new files in matching Store events

StoreFileDeletedEvent

Returns instance to register on deleted file Events.

Params

selectorType

StoreEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<StoreFileDeletedEventData> StoreFileDeletedEvent(
StoreEventSelectorType selectorType,
String selectorId
)

Returns

EventType<StoreFileDeletedEventData> · Predefined event type to catch deleted files in matching Store events

StoreFileUpdatedEvent

Returns instance to register on file update Events.

Params

selectorType

StoreEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<File> StoreFileUpdatedEvent(
StoreEventSelectorType selectorType,
String selectorId
)

Returns

EventType<File> · Predefined event type to catch updated files in matching Store events

StoreStatsChangedEvent

Predefined event type to catch updated Store stats events.

Params

selectorType

StoreEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<StoreStatsChangedEventData> StoreStatsChangedEvent(
StoreEventSelectorType selectorType,
String selectorId
)

Returns

EventType<StoreStatsChangedEventData> · Predefined event type to catch updated Store stats events.

StoreUpdatedEvent

Predefined event type to catch updated Store events.

Params

selectorType

StoreEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<Store> StoreUpdatedEvent(
StoreEventSelectorType selectorType,
String selectorId
)

Returns

EventType<Store> · Predefined event type to catch updated Store events.

ThreadCreatedEvent

Predefined event type to catch created Thread events.

Params

contextId

String

Context Id on which you listen for events

public static EventType<Thread> ThreadCreatedEvent(
String contextId
)

Returns

EventType<Thread> · Predefined event type to catch created Thread events.

ThreadDeletedEvent

Predefined event type to catch deleted Thread events.

Params

selectorType

ThreadEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<ThreadDeletedEventData> ThreadDeletedEvent(
ThreadEventSelectorType selectorType,
String selectorId
)

Returns

EventType<ThreadDeletedEventData> · Predefined event type to catch deleted Thread events.

ThreadMessageDeletedEvent

Returns instance to register on deleted message Events.

Params

selectorType

ThreadEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<ThreadDeletedMessageEventData> ThreadMessageDeletedEvent(
ThreadEventSelectorType selectorType,
String selectorId
)

Returns

EventType<ThreadDeletedMessageEventData> · Predefined event type to catch deleted messages in matching Thread events

ThreadMessageUpdatedEvent

Returns instance to register on message update Events.

Params

selectorType

ThreadEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<Message> ThreadMessageUpdatedEvent(
ThreadEventSelectorType selectorType,
String selectorId
)

Returns

EventType<Message> · Predefined event type to catch message updates in matching Thread events

ThreadNewMessageEvent

Returns instance to register on new message Events.

Params

selectorType

ThreadEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<Message> ThreadNewMessageEvent(
ThreadEventSelectorType selectorType,
String selectorId
)

Returns

EventType<Message> · Predefined event type to catch new messages in matching Thread events

ThreadStatsChangedEvent

Predefined event type to catch updated Thread stats events.

Params

selectorType

ThreadEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<ThreadStatsEventData> ThreadStatsChangedEvent(
ThreadEventSelectorType selectorType,
String selectorId
)

Returns

EventType<ThreadStatsEventData> · Predefined event type to catch updated Thread stats events.

ThreadUpdatedEvent

Predefined event type to catch updated Thread events.

Params

selectorType

ThreadEventSelectorType

scope on which you listen for events

selectorId

String

ID of the selector

public static EventType<Thread> ThreadUpdatedEvent(
ThreadEventSelectorType selectorType,
String selectorId
)

Returns

EventType<Thread> · Predefined event type to catch updated Thread events.

isLibEvent

Check if event was produced by PrivMX library.

Params

event

Event<?>

event instance to check

public static boolean isLibEvent(
Event<?> event
)

Returns

boolean · true if event is one of the PrivMX library Events.

Methods

equals

Params

o

Object

public boolean equals(
Object o
)

Returns

boolean ·

hashCode

public int hashCode()

Returns

int ·

isLibEvent

Check if this instance is event produced by PrivMX library.

public boolean isLibEvent()

Returns

boolean · true if instance is one of the PivMX library Events.

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

EventType | PrivMX Docs