Package eu.pursuit.core

Examples of eu.pursuit.core.ScopeID


   
    // 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.
    videoPublisher.publishCatalog();
View Full Code Here



    // 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.
    videoPublisher.publishCatalog();
View Full Code Here

   
    // Initialise the rootscope
    // 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);
   
    // immediately subscribe to the catalog
    videoSubscriber = new VideoSubscriber(client, rootScope, strategy);
   
    // initialise ridMappings
View Full Code Here

  public PPChannelReceiver(String seed, ByteIdentifier rid,
      BlackAdderClient ba) throws UnsupportedEncodingException,
      NoSuchAlgorithmException {
    this.rid = new ByteIdentifier(Utility.sha1(seed));
    this.scope = new ScopeID();
    scope.addSegment(new ByteIdentifier(Utility.sha1(rid.getId())));
    this.ba = ba;
  }
View Full Code Here

  public void receiveCall(String callee) throws NoSuchAlgorithmException,
      UnsupportedEncodingException {

    myRid = new ByteIdentifier(Utility.sha1(callee));
    sId = new ScopeID();
    ByteIdentifier b = new ByteIdentifier(Utility.sha1(myRid.getId()));
    sId.addSegment(b);
    ItemName receiveData = new ItemName(sId, myRid);

    Logger.log("waiting for call...");
View Full Code Here

  public void makeCall(String caller, String callee)
      throws NoSuchAlgorithmException, UnsupportedEncodingException {

    myRid = new ByteIdentifier(Utility.sha1(caller));
    otherEndId = new ByteIdentifier(Utility.sha1(callee));
    sId = new ScopeID();
    ByteIdentifier b = new ByteIdentifier(Utility.sha1(otherEndId.getId()));
    sId.addSegment(b);
    ItemName sendData = new ItemName(sId, otherEndId);

    client.publishRootScope(b, strategy, null);
View Full Code Here

  }

  public PPChannelSender(String seed, ByteIdentifier rid, BlackAdderClient ba)
      throws UnsupportedEncodingException, NoSuchAlgorithmException {
    this.rid = new ByteIdentifier(Utility.sha1(seed));
    this.scope = new ScopeID();
    scope.addSegment(new ByteIdentifier(Utility.sha1(rid.getId())));
    this.ba = ba;
    configure();
  }
View Full Code Here

    String sharedObjPath = "lib/bindings/java-binding/jni/eu_pursuit_client_BlackadderWrapper.o";
   
    BlackadderWrapper.configureObjectFile(sharedObjPath);
   
    BlackAdderClient client = BlackAdderClient.getInstance();
    ScopeID rootScope = new ScopeID();
    ByteIdentifier rootScopeId = new ByteIdentifier((byte)0, 8);
    rootScope.addSegment(rootScopeId);
   
    client.publishRootScope(rootScopeId, Strategy.NODE, null);
   
    ByteIdentifier rid = new ByteIdentifier((byte)1, 8);
    ItemName name = new ItemName(rootScope, rid);
View Full Code Here

   
    String sharedObjPath = "lib/bindings/java-binding/jni/eu_pursuit_client_BlackadderWrapper.o";
    BlackadderWrapper.configureObjectFile(sharedObjPath);
   
    BlackAdderClient client = BlackAdderClient.getInstance();
    ScopeID rootScope = new ScopeID();
    rootScope.addSegment(new ByteIdentifier((byte)0, 8));
   
    ByteIdentifier rid = new ByteIdentifier((byte)1, 8);
    ItemName name = new ItemName(rootScope, rid);
   
    client.subscribeItem(name, Strategy.NODE, null);
View Full Code Here

TOP

Related Classes of eu.pursuit.core.ScopeID

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.