Package eu.pursuit.core

Examples of eu.pursuit.core.ItemName


    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);
    Logger.log("Calling " + callee);

    client.publishItem(sendData, strategy, null);
    event = client.getNextEvent();

    System.arraycopy(myRid.getId(), 0, msg, 0, myRid.length());

    if (event.getType() == EventType.START_PUBLISH) {

      client.publishData(event.getId(), msg, strategy, null);
    }

    msgSeqNum++;

    ItemName receiveData = new ItemName(sId, myRid);

    client.subscribeItem(receiveData, strategy, null);
    event = client.getNextEvent();

    if (event.getType() == EventType.PUBLISHED_DATA) {
View Full Code Here


        Utility.sha1(participantName));
    participants.add(participantId);

    client.publishRootScope(sId.get(0), strategy, null);

    ItemName updateData;

    for (int i = 0; i < participants.size(); i++) {

      updateData = new ItemName(sId, participants.get(i));

      System.out.println("Sending new participant to all...");
      Logger.log("Adding " + participantName + " to the conversation...");
      client.publishItem(updateData, strategy, null);
      event = client.getNextEvent();
View Full Code Here

  public void leaveConversation() {

    client.publishRootScope(sId.get(0), strategy, null);

    ItemName leaveData;

    for (int i = 0; i < participants.size(); i++) {

      leaveData = new ItemName(sId, participants.get(i));

      System.out.println("Sending bye msg to all...");
      Logger.log("Sending Bye message to all...");
      client.publishItem(leaveData, strategy, null);
      event = client.getNextEvent();
View Full Code Here

  public PPChannelSender(ScopeID scope, ByteIdentifier rid,
      BlackAdderClient ba) {
    this.scope = scope;
    this.rid = rid;
    this.ba = ba;
    this.name = new ItemName(scope, rid);
    configure();
  }
View Full Code Here

  }

  public void configure() {

    ba.publishRootScope(scope.get(0), Strategy.NODE, null);
    name = new ItemName(scope, rid);
  }
View Full Code Here

    rootScope.addSegment(rootScopeId);
   
    client.publishRootScope(rootScopeId, Strategy.NODE, null);
   
    ByteIdentifier rid = new ByteIdentifier((byte)1, 8);
    ItemName name = new ItemName(rootScope, rid);
   
    System.out.println("Publishing");
    client.publishItem(name, Strategy.NODE, null);
    System.out.println("done");
    System.out.println("waiting for events");
View Full Code Here

    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);
   
    System.out.println("Subscribing");   
    System.out.println("waiting");
View Full Code Here

TOP

Related Classes of eu.pursuit.core.ItemName

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.