Package eu.pursuit.core

Examples of eu.pursuit.core.ByteIdentifier


    client = BlackAdderClient.getInstance();

   
    // publish the root scope where all videos will be published
    String rootScopeStr = "1111111111111111";
        ByteIdentifier rootId = new ByteIdentifier(Hex.decodeHex(rootScopeStr.toCharArray()));
        rootScope = new ScopeID(rootId);
        client.publishRootScope(rootId, strategy, null);
        rootGenerator = new IDGenerator();
        videoPublisher = new VideoPublisher(client, rootScope, strategy);
        // publish the catalog.
View Full Code Here


        String selected = getList().getSelectedItem();
        if (selected != null){
          // get the rid
          String rid = ridMappings.get(selected);
          //unpublish by rid
          ByteIdentifier vidID;
          try {
            videoPublisher.unpublishVideo(rid);
          } catch (DecoderException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
View Full Code Here

    }
  }
 
  public boolean publishVideo(String rid, String path) throws DecoderException{
    try{
        ByteIdentifier newPubID = new ByteIdentifier(Hex.decodeHex(rid.toCharArray()));
      ItemName newPubName = new ItemName(superScope, newPubID);
      client.publishItem(newPubName, strategy);
      // Add to the list.
      published.add(newPubName);
      addVideo(new VideoStream(path, getChannelID(), rid));
View Full Code Here

    }
  }
 
  public boolean unpublishVideo(String rid) throws DecoderException{
    try{
        ByteIdentifier newPubID = new ByteIdentifier(Hex.decodeHex(rid.toCharArray()));
      ItemName newPubName = new ItemName(superScope, newPubID);
      client.unpublishItem(newPubName, strategy);
      // remove from list
      ItemName marked = null;
      for (ItemName in: published){
View Full Code Here

  }

  public boolean publishCatalog() throws DecoderException{
    try {
      String catString = "0000000000000000";
      ByteIdentifier catID = new ByteIdentifier(Hex.decodeHex(catString.toCharArray()));
      catName = new ItemName(superScope, catID);
      client.publishItem(catName, strategy);

      return true;
    } catch (Exception e) {
View Full Code Here

    client = BlackAdderClient.getInstance();


    // publish the root scope where all videos will be published
    String rootScopeStr = "1111111111111111";
    ByteIdentifier rootId = new ByteIdentifier(Hex.decodeHex(rootScopeStr.toCharArray()));
    rootScope = new ScopeID(rootId);
    client.publishRootScope(rootId, strategy, null);
    rootGenerator = new IDGenerator();
    videoPublisher = new VideoPublisher(client, rootScope, strategy);
    // publish the catalog.
View Full Code Here

 
  public boolean subscribeCatalog(){ 
    try {
      // Subscribe to the catalog
      String catString = "0000000000000000";
      ByteIdentifier catID = new ByteIdentifier(Hex.decodeHex(catString.toCharArray()));
      catName = new ItemName(superScope, catID);
      client.subscribeItem(catName, strategy);
      return true;
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

 
  public boolean unsubscribeCatalog(){
    try {
      // Subscribe to the catalog
      String catString = "0000000000000000";
      ByteIdentifier catID = new ByteIdentifier(Hex.decodeHex(catString.toCharArray()));
      catName = new ItemName(superScope, catID);
      client.unsubscribeItem(catName, strategy);
      return true;
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

  }
 
  public boolean subscribeVideo(String rid){
    try {
      // Subscribe to the video
      ByteIdentifier vidID = new ByteIdentifier(Hex.decodeHex(rid.toCharArray()));
      ItemName vidName = new ItemName(superScope, vidID);
      client.subscribeItem(vidName, strategy);
      subscribed.add(vidName);
      return true;
    } catch (Exception e) {
View Full Code Here

  }
 
  public boolean unsubscribeVideo(String rid){
    try {
      // Subscribe to the video
      ByteIdentifier vidID = new ByteIdentifier(Hex.decodeHex(rid.toCharArray()));
      ItemName vidName = new ItemName(superScope, vidID);
      client.unsubscribeItem(vidName, strategy);
      // remove from list
      ItemName marked = null;
      for (ItemName in: subscribed){
View Full Code Here

TOP

Related Classes of eu.pursuit.core.ByteIdentifier

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.