Search in sources :

Example 1 with IConnection

use of org.red5.server.api.IConnection 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());
    }
}
Also used : IConnection(org.red5.server.api.IConnection)

Example 2 with IConnection

use of org.red5.server.api.IConnection 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;
}
Also used : IServiceCapableConnection(org.red5.server.api.service.IServiceCapableConnection) IConnection(org.red5.server.api.IConnection)

Example 3 with IConnection

use of org.red5.server.api.IConnection in project bigbluebutton by bigbluebutton.

the class VoiceConferenceApplication method appConnect.

@Override
public boolean appConnect(IConnection conn, Object[] params) {
    IServiceCapableConnection service = (IServiceCapableConnection) conn;
    log.debug("VoiceConferenceApplication appConnect[" + conn.getClient().getId() + "," + service + "]");
    return true;
}
Also used : IServiceCapableConnection(org.red5.server.api.service.IServiceCapableConnection)

Example 4 with IConnection

use of org.red5.server.api.IConnection in project bigbluebutton by bigbluebutton.

the class ConnectionInvokerService method handlDisconnectClientMessage.

private void handlDisconnectClientMessage(DisconnectClientMessage msg) {
    IScope meetingScope = getScope(msg.getMeetingId());
    if (meetingScope != null) {
        String userId = msg.getUserId();
        IConnection conn = getConnection(meetingScope, userId);
        if (conn != null) {
            if (conn.isConnected()) {
                log.info("Disconnecting user=[{}] from meeting=[{}]", msg.getUserId(), msg.getMeetingId());
                conn.close();
            }
        }
    }
}
Also used : IScope(org.red5.server.api.scope.IScope) IConnection(org.red5.server.api.IConnection)

Example 5 with IConnection

use of org.red5.server.api.IConnection 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("INTERNAL_USER_ID");
                log.info("Disconnecting client=[{}] from meeting=[{}]", connId, msg.getMeetingId());
                conn.close();
            }
        }
    }
}
Also used : IScope(org.red5.server.api.scope.IScope) IConnection(org.red5.server.api.IConnection)

Aggregations

IConnection (org.red5.server.api.IConnection)33 HashMap (java.util.HashMap)8 IScope (org.red5.server.api.scope.IScope)7 Gson (com.google.gson.Gson)6 Matcher (java.util.regex.Matcher)4 IServiceCapableConnection (org.red5.server.api.service.IServiceCapableConnection)4 ClientBroadcastStream (org.red5.server.stream.ClientBroadcastStream)4 ArrayList (java.util.ArrayList)2 ISharedObject (org.red5.server.api.so.ISharedObject)2 IStreamListener (org.red5.server.api.stream.IStreamListener)2 ExecutionException (java.util.concurrent.ExecutionException)1 TimeoutException (java.util.concurrent.TimeoutException)1 IoBuffer (org.apache.mina.core.buffer.IoBuffer)1 ScreenshareStreamListener (org.bigbluebutton.app.screenshare.ScreenshareStreamListener)1 PeerNotFoundException (org.bigbluebutton.voiceconf.sip.PeerNotFoundException)1 ConnectionClientMethodInvoker (org.red5.app.sip.ConnectionClientMethodInvoker)1 RTMPMinaConnection (org.red5.server.net.rtmp.RTMPMinaConnection)1 VideoData (org.red5.server.net.rtmp.event.VideoData)1