Package org.red5.server.stream

Examples of org.red5.server.stream.SimpleBWControlService$TokenRequest


        .setPrincipal(serviceAccountUser);
    payload.put("scope", serviceAccountScopes);
    try {
      String assertion =
          RsaSHA256Signer.sign(serviceAccountPrivateKey, getJsonFactory(), header, payload);
      TokenRequest request = new TokenRequest(getTransport(), getJsonFactory(), new GenericUrl(
          getTokenServerEncodedUrl()), "assertion");
      request.put("assertion_type", "http://oauth.net/grant_type/jwt/1.0/bearer");
      request.put("assertion", assertion);
      return request.execute();
    } catch (GeneralSecurityException exception) {
      IOException e = new IOException();
      e.initCause(exception);
      throw e;
    }
View Full Code Here


    payload.setSubject(serviceAccountUser);
    payload.put("scope", Joiner.on(' ').join(serviceAccountScopes));
    try {
      String assertion = JsonWebSignature.signUsingRsaSha256(
          serviceAccountPrivateKey, getJsonFactory(), header, payload);
      TokenRequest request = new TokenRequest(
          getTransport(), getJsonFactory(), new GenericUrl(getTokenServerEncodedUrl()),
          "urn:ietf:params:oauth:grant-type:jwt-bearer");
      request.put("assertion", assertion);
      return request.execute();
    } catch (GeneralSecurityException exception) {
      IOException e = new IOException();
      e.initCause(exception);
      throw e;
    }
View Full Code Here

    payload.setSubject(serviceAccountUser);
    payload.put("scope", Joiner.on(' ').join(serviceAccountScopes));
    try {
      String assertion = JsonWebSignature.signUsingRsaSha256(
          serviceAccountPrivateKey, getJsonFactory(), header, payload);
      TokenRequest request = new TokenRequest(
          getTransport(), getJsonFactory(), new GenericUrl(getTokenServerEncodedUrl()),
          "urn:ietf:params:oauth:grant-type:jwt-bearer");
      request.put("assertion", assertion);
      return request.execute();
    } catch (GeneralSecurityException exception) {
      IOException e = new IOException();
      e.initCause(exception);
      throw e;
    }
View Full Code Here

    }

    IStreamableFileService service = factory.getService(file);

    IStreamableFile flv = service.getStreamableFile(file);

    writer = flv.getWriter();

  }
View Full Code Here

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

     */

    private void init() throws IOException {

   
    IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils

        .getScopeService(scope, IStreamableFileFactory.class,

            StreamableFileFactory.class);

    File folder = file.getParentFile();

    if (!folder.exists()) {

      if (!folder.mkdirs()) {

        throw new IOException("Could not create parent folder");

      }

    }

    if (!file.isFile()) {

      // Maybe the (previously existing) file has been deleted

      file.createNewFile();

    } else if (!file.canWrite()) {

      throw new IOException("The file is read-only");

    }

    IStreamableFileService service = factory.getService(file);

    IStreamableFile flv = service.getStreamableFile(file);

    writer = flv.getWriter();

View Full Code Here

     *
     * @throws IOException          I/O exception
     */
    protected void init() throws IOException {

    IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils
        .getScopeService(this.scope, IStreamableFileFactory.class,
            StreamableFileFactory.class);
   
    File folder = file.getParentFile();

    if (!folder.exists()) {
      if (!folder.mkdirs()) {
        throw new IOException("Could not create parent folder");
      }
    }

    if (!this.file.isFile()) {

      // Maybe the (previously existing) file has been deleted
      this.file.createNewFile();

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

      throw new IOException("The file is read-only");

    }

    IStreamableFileService service = factory.getService(file);

    IStreamableFile flv = service.getStreamableFile(file);

    writer = flv.getWriter();

  }
View Full Code Here

    } else if (!file.canWrite()) {
      throw new IOException("The file is read-only");
    }

    IStreamableFileService service = factory.getService(this.file);
    IStreamableFile flv = service.getStreamableFile(this.file);
    this.writer = flv.getWriter();

  }
View Full Code Here

       
        int timeStamp = streampacket.getTimestamp();
       
        timeStamp -= startTimeStamp;
       
              ITag tag = new Tag();
              tag.setDataType(streampacket.getDataType());
             
              //log.debug("data.limit() :: "+data.limit());
        tag.setBodySize(data.limit());
        tag.setTimestamp(timeStamp);
        tag.setBody(data);
       
       
        if (this.isInterview) {
          if (timeStamp <= 500) {
            //We will cut the first 0.5 seconds
View Full Code Here

TOP

Related Classes of org.red5.server.stream.SimpleBWControlService$TokenRequest

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.