Package org.red5.server.api

Examples of org.red5.server.api.IGlobalScope


    String path = req.getContextPath() + req.getServletPath();
    if (path.startsWith("/")) {
      path = path.substring(1);
    }
    path = path.substring(0, path.length() - getServletName().length() - 1);
    IGlobalScope global = server.lookupGlobal(req.getServerName(), path);
    if (global == null) {
      global = server.lookupGlobal(req.getLocalName(), path);
      if (global == null) {
        global = server.lookupGlobal(req.getLocalAddr(), path);
      }
View Full Code Here


      if (packet == null) {
        log.error("Packet should not be null");
        return;
      }
      // Provide a valid IConnection in the Red5 object
      final IGlobalScope global = getGlobalScope(req);
      final IContext context = global.getContext();
      final IScope scope = context.resolveScope(global, packet.getScopePath());
      IRemotingConnection conn = new RemotingConnection(req, scope, packet);
      // Make sure the connection object isn't garbage collected
      req.setAttribute(CONNECTION, conn);
      try {
View Full Code Here

          final String sessionId = null;
          conn.setup(host, path, sessionId, params);
          try {
            // Lookup server scope when connected
            // Use host and application name
            IGlobalScope global = server.lookupGlobal(host, path);
            if (global == null) {
              call.setStatus(Call.STATUS_SERVICE_NOT_FOUND);
              if (call instanceof IPendingServiceCall) {
                StatusObject status = getStatus(NC_CONNECT_INVALID_APPLICATION);
                status.setDescription("No scope \"" + path
                    + "\" on this server.");
                ((IPendingServiceCall) call).setResult(status);
              }
              log.info("No application scope found for {} on host {}. Misspelled or missing application folder?", path, host);
              disconnectOnReturn = true;
            } else {
              final IContext context = global.getContext();
              IScope scope = null;
              try {
                scope = context.resolveScope(global, path);
              } catch (ScopeNotFoundException err) {
                call.setStatus(Call.STATUS_SERVICE_NOT_FOUND);
View Full Code Here

          }
          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 = 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

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

    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.IGlobalScope

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.