public interface UserNotificationService
NotificationRoomHandler (provided by
the room SDK - DefaultNotificationRoomHandler).
JSON-RPC messages specification was used to define the following
primitives.It is expected but not required for the client-server
communications to use this protocol. It is left for the integrator to provide
an implementation for this API. If the developer chooses another mechanism to
communicate with the client, they will have to use their own implementation
of NotificationRoomHandler which will completly decouple the communication details
from the room API.| Modifier and Type | Method and Description |
|---|---|
void |
closeSession(ParticipantRequest participantRequest)
Notifies that any information associated with the provided request should
be cleaned up (the participant has left).
|
void |
sendErrorResponse(ParticipantRequest participantRequest,
Object data,
RoomException error)
Responds back to the remote peer with the details of why the invoked
method failed to be processed correctly.
|
void |
sendNotification(String participantId,
String method,
Object params)
Sends a notification to a remote peer.
|
void |
sendResponse(ParticipantRequest participantRequest,
Object result)
Responds back to the remote peer with the result of the invoked method.
|
void sendResponse(ParticipantRequest participantRequest, Object result)
participantRequest - instance of ParticipantRequest POJOresult - Object containing information that depends on the invoked
method. It'd normally be a JSON element-type object.void sendErrorResponse(ParticipantRequest participantRequest, Object data, RoomException error)
participantRequest - instance of ParticipantRequest POJOdata - optional (nullable) Object containing additional information
on the error. Can be a String or a JSON element-type object.error - instance of RoomException POJO, includes a code and
error messagevoid sendNotification(String participantId, String method, Object params)
participantId - identifier of the targeted participantmethod - String with the name of the method or event to be invoked
on the clientparams - Object containing information that depends on the invoked
method. It'd normally be a JSON element-type object.void closeSession(ParticipantRequest participantRequest)
participantRequest - instance of ParticipantRequest POJOCopyright © 2015 Kurento. All rights reserved.