Package org.red5.server.api

Examples of org.red5.server.api.IScopeHandler


        String scopeName = "hibernate";
        if (rcl.getRoom_id() != null) {
          scopeName = rcl.getRoom_id().toString();
        }
        IScope currentScope = ScopeApplicationAdapter.getInstance()
            .getRoomScope(scopeName);
        ScopeApplicationAdapter.getInstance().roomLeaveByScope(rcl,
            currentScope);

        HashMap<Integer, String> messageObj = new HashMap<Integer, String>();
View Full Code Here


         }
         String scopeName = "hibernate";
         if (rcl.getRoom_id() != null) {
           scopeName = rcl.getRoom_id().toString();
         }
         IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         this.scopeApplicationAdapter.roomLeaveByScope(rcl, currentScope);
        
        
         HashMap<Integer,String> messageObj = new HashMap<Integer,String>();
         messageObj.put(0, "kick");
View Full Code Here

          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         
          HashMap<Integer,String> messageObj = new HashMap<Integer,String>();
          messageObj.put(0, "kick");
         
          this.scopeApplicationAdapter.sendMessageById(messageObj, rcl.getStreamid(), currentScope);
View Full Code Here

    }
   
    final Set<IConnection> conns = clients.get(client);
    if (conns != null) {
      conns.remove(conn);
      IScopeHandler handler = null;
      if (hasHandler()) {
        handler = getHandler();
        try {
          handler.disconnect(conn, this);
        } catch (Exception e) {
          log.error("Error while executing \"disconnect\" for connection {} on handler {}. {}", new Object[]{conn, handler, e});
        }
      }
      if (conns.isEmpty()) {
        clients.remove(client);
        clientStats.decrement();
        if (handler != null) {
          try {
            // there may be a timeout here ?
            handler.leave(client, this);
          } catch (Exception e) {
            log.error("Error while executing \"leave\" for client {} on handler {}. {}", new Object[]{conn, handler, e});
          }
        }
      }
View Full Code Here

*/
public class HandlerServiceResolver implements IServiceResolver {

  /** {@inheritDoc} */
    public Object resolveService(IScope scope, String serviceName) {
    IScopeHandler handler = scope.getHandler();
    if (handler instanceof IServiceHandlerProvider) {
      // TODO: deprecate this?
      Object result = ((IServiceHandlerProvider) handler)
          .getServiceHandler(serviceName);
      if (result != null) {
View Full Code Here

     * Return stream aware scope handler or null if scope is null
     * @return      IStreamAwareScopeHandler implementation
     */
  protected IStreamAwareScopeHandler getStreamAwareHandler() {
    if (scope != null) {
      IScopeHandler handler = scope.getHandler();
      if (handler instanceof IStreamAwareScopeHandler) {
        return (IStreamAwareScopeHandler) handler;
      }
    }
    return null;
View Full Code Here

   * @param call  Service call
   */
  protected void invokeCall(RTMPConnection conn, IServiceCall call) {
    final IScope scope = conn.getScope();
    if (scope.hasHandler()) {
      final IScopeHandler handler = scope.getHandler();
      log.debug("Scope: {}", scope);
      log.debug("Handler: {}", handler);
      if (!handler.serviceCall(conn, call)) {
        // XXX: What do do here? Return an error?
        return;
      }
    }

View Full Code Here

    // ------------------------------------------------------------------------

    private void createPlayStream( IPendingServiceCallback callback ) {

        logger.debug( "create play stream" );
        IPendingServiceCallback wrapper = new CreatePlayStreamCallBack( callback );
        invoke( "createStream", null, wrapper );
    }
View Full Code Here

      if (stream.getStreamListeners() != null) {
       
        for (Iterator<IStreamListener> iter = stream.getStreamListeners().iterator();iter.hasNext();) {
         
          IStreamListener iStreamListener = iter.next();
         
          ListenerAdapter listenerAdapter = (ListenerAdapter) iStreamListener;
         
          log.debug("Stream Closing ?? "+listenerAdapter.getFlvRecordingMetaDataId()+ " " +flvRecordingMetaDataId);
         
View Full Code Here

            if ( !( event instanceof IRTMPEvent ) ) {
                logger.debug( "skipping non rtmp event: " + event );
                return;
            }

            IRTMPEvent rtmpEvent = (IRTMPEvent) event;

            if ( logger.isDebugEnabled() ) {
                // logger.debug("rtmp event: " + rtmpEvent.getHeader() + ", " +
                // rtmpEvent.getClass().getSimpleName());
            }

            if ( !( rtmpEvent instanceof IStreamData ) ) {
                logger.debug( "skipping non stream data" );
                return;
            }

            if ( rtmpEvent.getHeader().getSize() == 0 ) {
                logger.debug( "skipping event where size == 0" );
                return;
            }

            if ( rtmpEvent instanceof VideoData ) {
View Full Code Here

TOP

Related Classes of org.red5.server.api.IScopeHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.