public class NotificationRoomManager extends Object
| Constructor and Description |
|---|
NotificationRoomManager(NotificationRoomHandler notificationRoomHandler,
KurentoClientProvider kcProvider)
Provides an instance of the room manager by setting an event handler.
|
NotificationRoomManager(UserNotificationService notificationService,
KurentoClientProvider kcProvider)
Provides an instance of the room manager by setting an user notification service that will be
used by the default event handler to send responses and notifications back to the clients.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMediaElement(String participantId,
org.kurento.client.MediaElement element) |
void |
addMediaElement(String participantId,
org.kurento.client.MediaElement element,
org.kurento.client.MediaType type) |
void |
close() |
void |
closeRoom(String roomName) |
void |
createRoom(KurentoClientSessionInfo kcSessionInfo) |
void |
evictParticipant(String participantId)
Application-originated request to remove a participant from the room.
|
String |
generatePublishOffer(String participantId) |
Set<UserParticipant> |
getParticipants(String roomName) |
Set<UserParticipant> |
getPeerPublishers(String participantId) |
Set<UserParticipant> |
getPeerSubscribers(String participantId) |
org.kurento.client.MediaPipeline |
getPipeline(String participantId) |
Set<UserParticipant> |
getPublishers(String roomName) |
RoomManager |
getRoomManager() |
Set<String> |
getRooms() |
Set<UserParticipant> |
getSubscribers(String roomName) |
void |
joinRoom(String userName,
String roomName,
boolean dataChannels,
boolean webParticipant,
ParticipantRequest request)
Calls
RoomManager#joinRoom(String, String, boolean, KurentoClientSessionInfo, String)
with a DefaultKurentoClientSessionInfo bean as implementation of the
KurentoClientSessionInfo. |
void |
leaveRoom(ParticipantRequest request) |
void |
mutePublishedMedia(MutedMediaType muteType,
String participantId) |
void |
muteSubscribedMedia(String remoteName,
MutedMediaType muteType,
String participantId) |
void |
onIceCandidate(String endpointName,
String candidate,
int sdpMLineIndex,
String sdpMid,
ParticipantRequest request) |
void |
publishMedia(ParticipantRequest request,
boolean isOffer,
String sdp,
org.kurento.client.MediaElement loopbackAlternativeSrc,
org.kurento.client.MediaType loopbackConnectionType,
boolean doLoopback,
org.kurento.client.MediaElement... mediaElements) |
void |
publishMedia(ParticipantRequest request,
String sdpOffer,
boolean doLoopback,
org.kurento.client.MediaElement... mediaElements) |
void |
removeMediaElement(String participantId,
org.kurento.client.MediaElement element) |
void |
sendMessage(String message,
String userName,
String roomName,
ParticipantRequest request)
Used by clients to send written messages to all other participants in the room.
Side effects: The room event handler should acknowledge the client's request by sending an empty message. |
void |
subscribe(String remoteName,
String sdpOffer,
ParticipantRequest request) |
void |
unmutePublishedMedia(String participantId) |
void |
unmuteSubscribedMedia(String remoteName,
String participantId) |
void |
unpublishMedia(ParticipantRequest request) |
void |
unsubscribe(String remoteName,
ParticipantRequest request) |
public NotificationRoomManager(UserNotificationService notificationService, KurentoClientProvider kcProvider)
notificationService - encapsulates the communication layer, used to instantiate
DefaultNotificationRoomHandlerkcProvider - enables the manager to obtain Kurento Client instancespublic NotificationRoomManager(NotificationRoomHandler notificationRoomHandler, KurentoClientProvider kcProvider)
notificationRoomHandler - the room event handler implementationkcProvider - enables the manager to obtain Kurento Client instancespublic void joinRoom(String userName, String roomName, boolean dataChannels, boolean webParticipant, ParticipantRequest request)
RoomManager#joinRoom(String, String, boolean, KurentoClientSessionInfo, String)
with a DefaultKurentoClientSessionInfo bean as implementation of the
KurentoClientSessionInfo.b - request - instance of ParticipantRequest POJO containing the participant's id and a
request id (optional identifier of the request at the communications level, included
when responding back to the client)RoomManager.joinRoom(String, String, boolean, boolean, KurentoClientSessionInfo, String)public void leaveRoom(ParticipantRequest request)
request - instance of ParticipantRequest POJORoomManager.leaveRoom(String)public void publishMedia(ParticipantRequest request, boolean isOffer, String sdp, org.kurento.client.MediaElement loopbackAlternativeSrc, org.kurento.client.MediaType loopbackConnectionType, boolean doLoopback, org.kurento.client.MediaElement... mediaElements)
request - instance of ParticipantRequest POJORoomManager.publishMedia(String, boolean, String, MediaElement, MediaType, boolean,
MediaElement...)public void publishMedia(ParticipantRequest request, String sdpOffer, boolean doLoopback, org.kurento.client.MediaElement... mediaElements)
request - instance of ParticipantRequest POJORoomManager.publishMedia(String, String, boolean, MediaElement...)public void unpublishMedia(ParticipantRequest request)
request - instance of ParticipantRequest POJORoomManager.unpublishMedia(String)public void subscribe(String remoteName, String sdpOffer, ParticipantRequest request)
request - instance of ParticipantRequest POJORoomManager.subscribe(String, String, String)public void unsubscribe(String remoteName, ParticipantRequest request)
request - instance of ParticipantRequest POJORoomManager.unsubscribe(String, String)public void onIceCandidate(String endpointName, String candidate, int sdpMLineIndex, String sdpMid, ParticipantRequest request)
public void sendMessage(String message, String userName, String roomName, ParticipantRequest request)
message - message contentsuserName - name or identifier of the user in the roomroomName - room's namerequest - instance of ParticipantRequest POJO@PreDestroy public void close()
RoomManager.close()public Set<String> getRooms()
RoomManager.getRooms()public Set<UserParticipant> getParticipants(String roomName) throws RoomException
RoomExceptionRoomManager.getParticipants(String)public Set<UserParticipant> getPublishers(String roomName) throws RoomException
RoomExceptionRoomManager.getPublishers(String)public Set<UserParticipant> getSubscribers(String roomName) throws RoomException
RoomExceptionRoomManager.getSubscribers(String)public Set<UserParticipant> getPeerPublishers(String participantId) throws RoomException
RoomExceptionRoomManager.getPeerPublishers(String)public Set<UserParticipant> getPeerSubscribers(String participantId) throws RoomException
RoomExceptionRoomManager.getPeerSubscribers(String)public void createRoom(KurentoClientSessionInfo kcSessionInfo) throws RoomException
RoomExceptionRoomManager.createRoom(KurentoClientSessionInfo)public org.kurento.client.MediaPipeline getPipeline(String participantId) throws RoomException
RoomExceptionRoomManager.getPipeline(String)public void evictParticipant(String participantId) throws RoomException
RoomExceptionRoomManager.leaveRoom(String)public void closeRoom(String roomName) throws RoomException
RoomExceptionRoomManager.closeRoom(String)public String generatePublishOffer(String participantId) throws RoomException
RoomExceptionRoomManager.generatePublishOffer(String)public void addMediaElement(String participantId, org.kurento.client.MediaElement element) throws RoomException
RoomExceptionRoomManager.addMediaElement(String, MediaElement)public void addMediaElement(String participantId, org.kurento.client.MediaElement element, org.kurento.client.MediaType type) throws RoomException
RoomExceptionRoomManager.addMediaElement(String, MediaElement, MediaType)public void removeMediaElement(String participantId, org.kurento.client.MediaElement element) throws RoomException
RoomExceptionRoomManager.removeMediaElement(String, MediaElement)public void mutePublishedMedia(MutedMediaType muteType, String participantId) throws RoomException
RoomExceptionRoomManager.mutePublishedMedia(MutedMediaType, String)public void unmutePublishedMedia(String participantId) throws RoomException
RoomExceptionRoomManager.unmutePublishedMedia(String)public void muteSubscribedMedia(String remoteName, MutedMediaType muteType, String participantId) throws RoomException
RoomExceptionRoomManager.muteSubscribedMedia(String, MutedMediaType, String)public void unmuteSubscribedMedia(String remoteName, String participantId) throws RoomException
RoomExceptionRoomManager.unmuteSubscribedMedia(String, String)public RoomManager getRoomManager()
Copyright © 2016 Kurento. All rights reserved.