Package com.kurento.kmf.repository

Examples of com.kurento.kmf.repository.RepositoryItem


  @Override
  public void onContentRequest(HttpPlayerSession contentSession)
      throws Exception {
    String contentId = contentSession.getContentId();
    RepositoryItem repositoryItem = contentSession.getRepository()
        .findRepositoryItemById(contentId);
    if (repositoryItem == null) {
      String message = "Repository item " + contentId + " does no exist";
      getLogger().warn(message);
      contentSession.terminate(404, message);
View Full Code Here


  private void addRecorder(WebRtcContentSession contentSession,
      boolean repositoryRecorder) {
    itemId = "campus-party-" + Calendar.getInstance().getTimeInMillis();

    if (repositoryRecorder) {
      RepositoryItem repositoryItem = contentSession.getRepository()
          .createRepositoryItem(itemId);
      RepositoryHttpRecorder recorder = repositoryItem
          .createRepositoryHttpRecorder();
      getLogger().info(
          "repositoryRecorderUrl + recorder.getURL()" + recorderUrl
              + recorder.getURL());
      recorderEndpoint = mediaPipeline.newRecorderEndpoint(
View Full Code Here

  @Override
  public void onContentRequest(HttpPlayerSession contentSession)
      throws Exception {
    String contentId = contentSession.getContentId();
    RepositoryItem repositoryItem = contentSession.getRepository()
        .findRepositoryItemById(contentId);
    if (repositoryItem == null) {
      String message = "Repository item " + contentId + " does no exist";
      getLogger().warn(message);
      contentSession.terminate(404, message);
    } else {
      RepositoryHttpPlayer player = repositoryItem
          .createRepositoryHttpPlayer();
      String mediaUrl = contentSession.getHttpServletRequest()
          .getScheme()
          + "://"
          + config.getHandlerAddress()
View Full Code Here

  @Override
  public void onContentRequest(HttpPlayerSession contentSession)
      throws Exception {
    String contentId = contentSession.getContentId();
    RepositoryItem repositoryItem = contentSession.getRepository()
        .findRepositoryItemById(contentId);
    if (repositoryItem == null) {
      String message = "Repository item " + contentId + " does no exist";
      getLogger().warn(message);
      contentSession.terminate(404, message);
View Full Code Here

  public static final Logger log = LoggerFactory
      .getLogger(GenericRepositoryRecorder.class);

  public static void record(HttpRecorderSession contentSession, String itemId) {
    Repository repository = contentSession.getRepository();
    RepositoryItem repositoryItem;
    try {
      repositoryItem = repository.findRepositoryItemById(itemId);
      log.info("Deleting existing repository '{}'", itemId);
      repository.remove(repositoryItem);
    } catch (NoSuchElementException e) {
View Full Code Here

    os.close();
  }

  protected File downloadFromRepoItemId(String id) throws Exception {

    RepositoryItem newRepositoryItem = getRepository()
        .findRepositoryItemById(id);

    RepositoryHttpPlayer player = newRepositoryItem
        .createRepositoryHttpPlayer();

    File downloadedFile = new File("test-files/tmp/" + id);

    if (downloadedFile.exists()) {
View Full Code Here

  }

  protected String uploadFile(File fileToUpload)
      throws FileNotFoundException, IOException {

    RepositoryItem repositoryItem = getRepository().createRepositoryItem();
    return uploadFile(fileToUpload, repositoryItem);
  }
View Full Code Here

      return;
    }

    elem.fireStartedEventIfFirstTime();

    RepositoryItem repositoryItem = elem.getRepositoryItem();
    RepositoryItemAttributes attributes = repositoryItem.getAttributes();

    if (debug > 0) {
      if (serveContent) {
        log("Serving resource with sessionId '"
            + sessionId
            + "' headers and data. This resource corresponds to repository item '"
            + repositoryItem.getId() + "'");
      } else {
        log("Serving resource with sessionId '"
            + sessionId
            + "' headers only. This resource corresponds to repository item '"
            + repositoryItem.getId() + "'");
      }
    }

    boolean malformedRequest = response.getStatus() >= SC_BAD_REQUEST;
View Full Code Here

  @Override
  public void onContentRequest(HttpRecorderSession contentSession)
      throws Exception {
    final String itemId = "itemTunnel";
    Repository repository = contentSession.getRepository();
    RepositoryItem repositoryItem;
    try {
      repositoryItem = repository.findRepositoryItemById(itemId);
      getLogger().info("Deleting existing repository '{}'", itemId);
      repository.remove(repositoryItem);
    } catch (NoSuchElementException e) {
View Full Code Here

  @Override
  public void onContentRequest(HttpPlayerSession contentSession)
      throws Exception {
    String contentId = contentSession.getContentId();
    RepositoryItem repositoryItem = contentSession.getRepository()
        .findRepositoryItemById(contentId);
    if (repositoryItem == null) {
      String message = "Repository item " + contentId + " does no exist";
      getLogger().warn(message);
      contentSession.terminate(404, message);
View Full Code Here

TOP

Related Classes of com.kurento.kmf.repository.RepositoryItem

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.