Package org.red5.server.service

Examples of org.red5.server.service.PendingCall


         }
         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

        buffer.clear();
        buffer.put( video );
        buffer.flip();

        VideoData videoData = new VideoData( buffer );
        videoData.setTimestamp( (int) ts );

        kt++;

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
View Full Code Here

        buffer.clear();
        buffer.put( video );
        buffer.flip();

        VideoData videoData = new VideoData( buffer );
        videoData.setTimestamp( (int) ts );

        kt++;

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
View Full Code Here

  public void sendStatus(Status status) {
    if (connection != null) {
      final boolean andReturn = !status.getCode().equals(StatusCodes.NS_DATA_START);
      final Invoke event = new Invoke();
      if (andReturn) {
        final PendingCall call = new PendingCall(null, CALL_ON_STATUS, new Object[] { status });
        if (status.getCode().equals(StatusCodes.NS_PLAY_START)) {
          IScope scope = connection.getScope();
          if (scope.getContext().getApplicationContext().containsBean(IRtmpSampleAccess.BEAN_NAME)) {
            IRtmpSampleAccess sampleAccess = (IRtmpSampleAccess) scope.getContext().getApplicationContext().getBean(IRtmpSampleAccess.BEAN_NAME);
            boolean videoAccess = sampleAccess.isVideoAllowed(scope);
View Full Code Here

          //if the conversion fails and the endpoint is not a ServiceAdapter
          //just drop the object directly into an array
          args = new Object[]{msg.body};
        }
       
        IPendingServiceCall call = new PendingCall(operation, args);
        try {
          if (!serviceInvoker.invoke(call, endpoint)) {
            if (call.getException() != null) {
              // Use regular exception handling
              Throwable err = call.getException();
              return returnError(msg, "Server.Invoke.Error", err.getMessage(), err);
            }
            return returnError(msg, "Server.Invoke.Error", "Can't invoke method.", "");
          }
        } catch (Throwable err) {
          log.error("Error while invoking method.", err);
          return returnError(msg, "Server.Invoke.Error", err.getMessage(), err);
        }
   
        //we got a valid result from the method call.
        result.body = call.getResult();
    }
   
    return result;
  }
View Full Code Here

//    resp.getWriter().write(message);
//    resp.flushBuffer();
   
    // create and send a rejected status
    Status status = new Status(StatusCodes.NC_CONNECT_REJECTED, Status.ERROR, message);
    PendingCall call = new PendingCall(null, "onStatus", new Object[] { status });
    Invoke event = new Invoke();
    event.setCall(call);
    Header header = new Header();
    Packet packet = new Packet(header, event);
    header.setDataType(event.getDataType());
View Full Code Here

TOP

Related Classes of org.red5.server.service.PendingCall

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.