Class PexipEventSinkService
java.lang.Object
org.exoplatform.webconferencing.pexip.service.PexipEventSinkService
Applies the events the Pexip Event Sink posts to the Web Conferencing calls:
a conference end makes the users still in a group call leave it, the last
of them stopping it, and stops the call when none was or for a 1:1 call, a
participant connection or disconnection
joins or leaves the call on behalf of the eXo user whose username is the
participant display name. That name identifies the user only when Pexip
fills it from the Identity Provider of the host role, so only the
participants Pexip authenticated are applied, unless the eXo clients send
the username as display name (
exo.pexip.usernameAsDisplayName), a
mode where anyone can take the name of a user. Pexip posts the events
concurrently, not always in sequence order: on a server, the events of a call
are applied one at a time, in no particular order. A participant
disconnection received before its connection is applied first, as a leave:
it removes a 1:1 call, whose connection is then ignored, and the
connection then joins a group call, restarting it if that leave stopped it.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies the events of an Event Sink payload, a single event or a bulk of events.booleanisAuthorized(String authorization) Checks the credentials of an Event Sink request against the configured ones, in constant time.
-
Field Details
-
EVENT_BULK
- See Also:
-
EVENT_CONFERENCE_ENDED
- See Also:
-
EVENT_PARTICIPANT_CONNECTED
- See Also:
-
EVENT_PARTICIPANT_DISCONNECTED
- See Also:
-
ROLE_GUEST
- See Also:
-
INVALID_PAYLOAD
- See Also:
-
-
Constructor Details
-
PexipEventSinkService
public PexipEventSinkService()
-
-
Method Details
-
isAuthorized
Checks the credentials of an Event Sink request against the configured ones, in constant time. Without configured credentials, every request is refused.- Parameters:
authorization- the Authorization header of the request- Returns:
- true when it carries the configured Basic credentials
-
handle
Applies the events of an Event Sink payload, a single event or a bulk of events. An event that does not designate a known call or user is ignored.- Parameters:
payload- the JSON payload posted by Pexip- Throws:
IllegalArgumentException- when the payload is not a JSON object
-