/** * Adds <tt>WebRtcDataStreamListener</tt> to the list of listeners. * * @param listener the <tt>WebRtcDataStreamListener</tt> to be added to the listeners list. */ public void addChannelListener(WebRtcDataStreamListener listener) { if (listener == null) { throw new NullPointerException("listener"); } else { synchronized (listeners) { if (!listeners.contains(listener)) { listeners.add(listener); } } } }
/** * Expires a specific <tt>Content</tt> of this <tt>Conference</tt> (i.e. if the specified * <tt>content</tt> is not in the list of <tt>Content</tt>s of this <tt>Conference</tt>, does * nothing). * * @param content the <tt>Content</tt> to be expired by this <tt>Conference</tt> */ public void expireContent(Content content) { boolean expireContent; synchronized (contents) { if (contents.contains(content)) { contents.remove(content); expireContent = true; } else expireContent = false; } if (expireContent) content.expire(); }