use of org.red5.server.api.scope.IScope in project bigbluebutton by bigbluebutton.
the class ConnectionInvokerService method handleDisconnectAllClientsMessage.
private void handleDisconnectAllClientsMessage(DisconnectAllClientsMessage msg) {
IScope meetingScope = getScope(msg.getMeetingId());
if (meetingScope != null) {
Set<IConnection> conns = meetingScope.getClientConnections();
for (IConnection conn : conns) {
if (conn.isConnected()) {
String connId = (String) conn.getAttribute("USERID");
log.info("Disconnecting client=[{}] from meeting=[{}]", connId, msg.getMeetingId());
conn.close();
}
}
}
}
use of org.red5.server.api.scope.IScope in project bigbluebutton by bigbluebutton.
the class ConnectionInvokerService method handlDisconnectClientMessage.
private void handlDisconnectClientMessage(DisconnectClientMessage msg) {
IScope meetingScope = getScope(msg.getMeetingId());
if (meetingScope != null) {
IConnection conn = getConnection(meetingScope, msg.getUserId());
if (conn != null) {
if (conn.isConnected()) {
log.info("Disconnecting user=[{}] from meeting=[{}]", msg.getUserId(), msg.getMeetingId());
conn.close();
}
}
}
}
use of org.red5.server.api.scope.IScope in project bigbluebutton by bigbluebutton.
the class SipPhoneApplication method appLeave.
@Override
public void appLeave(IClient client, IScope scope) {
IConnection conn = Red5.getConnectionLocal();
loginfo("Red5SIP Client leaving app " + client.getId());
if (userNames.containsKey(client.getId())) {
loginfo("Red5SIP Client closing client " + userNames.get(client.getId()));
// sipManager.closeSIPUser( userNames.get( client.getId() ) );
userNames.remove(client.getId());
}
}
use of org.red5.server.api.scope.IScope in project bigbluebutton by bigbluebutton.
the class SipPhoneApplication method appJoin.
@Override
public boolean appJoin(IClient client, IScope scope) {
loginfo("Red5SIP Client joined app " + client.getId());
IConnection conn = Red5.getConnectionLocal();
IServiceCapableConnection service = (IServiceCapableConnection) conn;
return true;
}
use of org.red5.server.api.scope.IScope in project bigbluebutton by bigbluebutton.
the class ListenStream method startPublishing.
private void startPublishing(IScope aScope) {
System.out.println("started publishing stream in " + aScope.getName());
broadcastStream = new AudioStream(listenStreamName);
broadcastStream.setPublishedName(listenStreamName);
broadcastStream.setScope(aScope);
IContext context = aScope.getContext();
IProviderService providerService = (IProviderService) context.getBean(IProviderService.BEAN_NAME);
if (providerService.registerBroadcastStream(aScope, listenStreamName, broadcastStream)) {
// Do nothing.
} else {
log.error("could not register broadcast stream");
throw new RuntimeException("could not register broadcast stream");
}
broadcastStream.start();
}
Aggregations