Package org.red5.server.api

Examples of org.red5.server.api.IContext


     * @param conn         Connection to invoke method on
     * @param call         Service call context
     * @return             true on success
     */
    public boolean serviceCall(IConnection conn, IServiceCall call) {
    final IContext context = conn.getScope().getContext();
    if (call.getServiceName() != null) {
      context.getServiceInvoker().invoke(call, context);
    } else {
      context.getServiceInvoker().invoke(call,
          conn.getScope().getHandler());
    }
    return true;
  }
View Full Code Here


    if (log.isDebugEnabled()) log.debug("started publishing stream in scope=[" + scope.getName() + "] path=[" + scope.getPath() + "]");
    audioBroadcastStream = new AudioBroadcastStream(listenStreamName);
    audioBroadcastStream.setPublishedName(listenStreamName);
    audioBroadcastStream.setScope(scope);
   
    IContext context = scope.getContext();
   
    IProviderService providerService = (IProviderService) context.getBean(IProviderService.BEAN_NAME);
    if (providerService.registerBroadcastStream(scope, listenStreamName, audioBroadcastStream)){
      // Do nothing. Successfully registered a live broadcast stream. (ralam Sept. 4, 2012)
    } else{
      log.error("could not register broadcast stream");
      throw new RuntimeException("could not register broadcast stream");
View Full Code Here

    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");
View Full Code Here

  }
 
  @Override
    public boolean appStart(IScope app) {
    log.debug("***** " + APP + " [ " + " appStart [ " + scope.getName() + "] *********");
    IContext context = app.getContext();
    appCtx = (AbstractApplicationContext) context.getApplicationContext();
    appCtx.addApplicationListener(new ShutdownHookListener());
    appCtx.registerShutdownHook();
    super.appStart(app);
       
    connInvokerService.setAppScope(app);
View Full Code Here

        // Get previously registred handler for service
        Object soHandler = getServiceHandler(serviceName);
    if (soHandler == null && hasParent()) {
      // No custom handler, check for service defined in the scope's
      // context
      IContext context = getParent().getContext();
      try {
        // The bean must have a name of
        // "<SharedObjectName>.<DottedServiceName>.soservice"
        soHandler = context.getBean(so.getName() + '.' + serviceName
            + ".soservice");
      } catch (Exception err) {
        log.debug("No such bean");
      }
    }
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

TOP

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

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.