@Override
 public void decodeRest(final HornetQBuffer buffer) {
   synchronizationIsFinished = buffer.readBoolean();
   allowsAutoFailBack = buffer.readBoolean();
   nodeID = buffer.readString();
   if (synchronizationIsFinished) {
     return;
   }
   dataType = SyncDataType.getDataType(buffer.readByte());
   int length = buffer.readInt();
   ids = new long[length];
   for (int i = 0; i < length; i++) {
     ids[i] = buffer.readLong();
   }
 }
  @Override
  public void decodeRest(final HornetQBuffer buffer) {
    // Buffer comes in after having read standard headers and positioned at Beginning of body part

    message.decodeFromBuffer(buffer);

    int ri = buffer.readerIndex();

    requiresResponse = buffer.readBoolean();

    buffer.readerIndex(ri);
  }
Example #3
0
 public void decodeHeadersAndProperties(final HornetQBuffer buffer) {
   messageID = buffer.readLong();
   address = buffer.readNullableSimpleString();
   if (buffer.readByte() == DataConstants.NOT_NULL) {
     byte[] bytes = new byte[16];
     buffer.readBytes(bytes);
     userID = new UUID(UUID.TYPE_TIME_BASED, bytes);
   } else {
     userID = null;
   }
   type = buffer.readByte();
   durable = buffer.readBoolean();
   expiration = buffer.readLong();
   timestamp = buffer.readLong();
   priority = buffer.readByte();
   properties.decode(buffer);
 }
  public static List<Pair<TransportConfiguration, TransportConfiguration>> decodeConfigs(
      HornetQBuffer buffer) {
    int size = buffer.readInt();
    List<Pair<TransportConfiguration, TransportConfiguration>> configs =
        new ArrayList<Pair<TransportConfiguration, TransportConfiguration>>(size);

    for (int i = 0; i < size; i++) {
      TransportConfiguration live = decode(buffer);
      boolean hasBackup = buffer.readBoolean();
      TransportConfiguration backup = null;
      if (hasBackup) {
        backup = decode(buffer);
      }
      configs.add(new Pair<TransportConfiguration, TransportConfiguration>(live, backup));
    }

    return configs;
  }