示例#1
0
  /**
   * @param inReference
   * @return
   */
  public static Message createSubscriptionMessage(int inReference) {
    SubscribeMessage.Builder subMessB = SubscribeMessage.newBuilder();
    subMessB.setReference(inReference);

    Message.Builder messB = Message.newBuilder();
    messB.setSubscribeMessage(subMessB);
    messB.setType(Message.Type.SubscribeMessage);

    return messB.build();
  }
示例#2
0
  public static Message createSubscriptionMessage(int inReference, ISTMEntryKey inKey) {
    SubscribeMessage.Builder subMessB = SubscribeMessage.newBuilder();

    DataKey key = createDataKey(inKey);
    subMessB.setKey(key);
    subMessB.setReference(inReference);

    Message.Builder messB = Message.newBuilder();
    messB.setSubscribeMessage(subMessB);
    messB.setType(Message.Type.SubscribeMessage);

    return messB.build();
  }