public interface NotificationRoomHandler extends RoomHandler
RoomHandler interface so that the clients are also notified of spontaneous media
events.RoomHandler| Modifier and Type | Method and Description |
|---|---|
void |
onParticipantEvicted(UserParticipant participant)
Called as a result of
NotificationRoomManager.evictParticipant(String) -
application-originated method, not as a consequence of a client request. |
void |
onParticipantJoined(ParticipantRequest request,
String roomName,
String newUserName,
Set<UserParticipant> existingParticipants,
RoomException error)
Called as a result of
NotificationRoomManager#joinRoom(String, String, ParticipantRequest) . |
void |
onParticipantLeft(ParticipantRequest request,
String userName,
Set<UserParticipant> remainingParticipants,
RoomException error)
Called as a result of
NotificationRoomManager#leaveRoom(String, String, ParticipantRequest) . |
void |
onParticipantLeft(String userName,
Set<UserParticipant> remainingParticipants)
Called as a result of
NotificationRoomManager.evictParticipant(String)
(application-originated action). |
void |
onPublishMedia(ParticipantRequest request,
String publisherName,
String sdpAnswer,
Set<UserParticipant> participants,
RoomException error)
Called as a result of
NotificationRoomManager#publishMedia(String, ParticipantRequest, MediaElement...) . |
void |
onRecvIceCandidate(ParticipantRequest request,
RoomException error)
Called as a result of
NotificationRoomManager.onIceCandidate(String, String, int, String, ParticipantRequest)
. |
void |
onRoomClosed(String roomName,
Set<UserParticipant> participants)
Called as a result of
NotificationRoomManager.closeRoom(String) -
application-originated method, not as a consequence of a client request. |
void |
onSendMessage(ParticipantRequest request,
String message,
String userName,
String roomName,
Set<UserParticipant> participants,
RoomException error)
Called as a result of
NotificationRoomManager.sendMessage(String, String, String, ParticipantRequest) . |
void |
onSubscribe(ParticipantRequest request,
String sdpAnswer,
RoomException error)
Called as a result of
NotificationRoomManager.subscribe(String, String, ParticipantRequest) . |
void |
onUnpublishMedia(ParticipantRequest request,
String publisherName,
Set<UserParticipant> participants,
RoomException error)
Called as a result of
NotificationRoomManager.unpublishMedia(ParticipantRequest). |
void |
onUnsubscribe(ParticipantRequest request,
RoomException error)
Called as a result of
NotificationRoomManager.unsubscribe(String, ParticipantRequest). |
onIceCandidate, onMediaElementError, onPipelineErrorvoid onParticipantJoined(ParticipantRequest request, String roomName, String newUserName, Set<UserParticipant> existingParticipants, RoomException error)
NotificationRoomManager#joinRoom(String, String, ParticipantRequest) . The new
participant should be responded with all the available information: the existing peers and, for
any publishers, their stream names. The current peers should receive a notification of the join
event.request - instance of ParticipantRequest POJO to identify the user and the requestroomName - the room's namenewUserName - the new userexistingParticipants - instances of UserParticipant POJO representing the already existing peerserror - instance of RoomException POJO, includes a code and error message. If not
null, then the join was unsuccessful and the user should be responded accordingly.void onParticipantLeft(ParticipantRequest request, String userName, Set<UserParticipant> remainingParticipants, RoomException error)
NotificationRoomManager#leaveRoom(String, String, ParticipantRequest) . The user should
receive an acknowledgement if the operation completed successfully, and the remaining peers
should be notified of this event.request - instance of ParticipantRequest POJO to identify the user and the requestuserName - the departing user's nameremainingParticipants - instances of UserParticipant representing the remaining participants in the
roomerror - instance of RoomException POJO, includes a code and error message. If not
null, then the operation was unsuccessful and the user should be responded
accordingly.void onParticipantLeft(String userName, Set<UserParticipant> remainingParticipants)
NotificationRoomManager.evictParticipant(String)
(application-originated action). The remaining peers should be notified of this event.request - instance of ParticipantRequest POJO to identify the user and the requestuserName - the departing user's nameremainingParticipants - instances of UserParticipant representing the remaining participants in the
roomvoid onPublishMedia(ParticipantRequest request, String publisherName, String sdpAnswer, Set<UserParticipant> participants, RoomException error)
NotificationRoomManager#publishMedia(String, ParticipantRequest, MediaElement...) . The
user should receive the generated SPD answer from the local WebRTC endpoint, and the other
peers should be notified of this event.request - instance of ParticipantRequest POJO to identify the user and the requestpublisherName - the user namesdpAnswer - String with generated SPD answer from the local WebRTC endpointparticipants - instances of UserParticipant for ALL the participants in the room (includes
the publisher)error - instance of RoomException POJO, includes a code and error message. If not
null, then the operation was unsuccessful and the user should be responded
accordingly.void onUnpublishMedia(ParticipantRequest request, String publisherName, Set<UserParticipant> participants, RoomException error)
NotificationRoomManager.unpublishMedia(ParticipantRequest). The
user should receive an acknowledgement if the operation completed successfully, and all other
peers in the room should be notified of this event.request - instance of ParticipantRequest POJO to identify the user and the requestpublisherName - the user nameparticipants - instances of UserParticipant for ALL the participants in the room (includes
the publisher)error - instance of RoomException POJO, includes a code and error message. If not
null, then the operation was unsuccessful and the user should be responded
accordingly.void onSubscribe(ParticipantRequest request, String sdpAnswer, RoomException error)
NotificationRoomManager.subscribe(String, String, ParticipantRequest) . The user should
be responded with generated SPD answer from the local WebRTC endpoint.request - instance of ParticipantRequest POJO to identify the user and the requestsdpAnswer - String with generated SPD answer from the local WebRTC endpointerror - instance of RoomException POJO, includes a code and error message. If not
null, then the operation was unsuccessful and the user should be responded
accordingly.void onUnsubscribe(ParticipantRequest request, RoomException error)
NotificationRoomManager.unsubscribe(String, ParticipantRequest).
The user should receive an acknowledgement if the operation completed successfully (no error).request - instance of ParticipantRequest POJO to identify the user and the requesterror - instance of RoomException POJO, includes a code and error message. If not
null, then the operation was unsuccessful and the user should be responded
accordingly.void onSendMessage(ParticipantRequest request, String message, String userName, String roomName, Set<UserParticipant> participants, RoomException error)
NotificationRoomManager.sendMessage(String, String, String, ParticipantRequest) . The
user should receive an acknowledgement if the operation completed successfully, and all the
peers in the room should be notified with the message contents and its origin.request - instance of ParticipantRequest POJO to identify the user and the requestmessage - String with the message bodyuserName - name of the peer that sent itroomName - the current room nameparticipants - instances of UserParticipant for ALL the participants in the room (includes
the sender)error - instance of RoomException POJO, includes a code and error message. If not
null, then the operation was unsuccessful and the user should be responded
accordingly.void onRecvIceCandidate(ParticipantRequest request, RoomException error)
NotificationRoomManager.onIceCandidate(String, String, int, String, ParticipantRequest)
. The user should receive an acknowledgement if the operation completed successfully (no
error).request - instance of ParticipantRequest POJO to identify the user and the requesterror - instance of RoomException POJO, includes a code and error message. If not
null, then the operation was unsuccessful and the user should be responded
accordingly.void onRoomClosed(String roomName, Set<UserParticipant> participants)
NotificationRoomManager.closeRoom(String) -
application-originated method, not as a consequence of a client request. All resources on the
server, associated with the room, have been released. The existing participants in the room
should be notified of this event so that the client-side application acts accordingly.roomName - the room that's just been closedparticipants - instances of UserParticipant POJO representing the peers of the closed roomvoid onParticipantEvicted(UserParticipant participant)
NotificationRoomManager.evictParticipant(String) -
application-originated method, not as a consequence of a client request. The participant should
be notified so that the client-side application would terminate gracefully.participant - instance of UserParticipant POJO representing the evicted peerCopyright © 2016 Kurento. All rights reserved.