private void parseNotificationClientSync(ClientSync sync, ByteBuffer buf, int options, int payloadLength) { int payloadLimitPosition = buf.position() + payloadLength; NotificationClientSync nfSync = new NotificationClientSync(); nfSync.setTopicListHash(buf.getInt()); while (buf.position() < payloadLimitPosition) { byte fieldId = buf.get(); // reading unused reserved field buf.get(); switch (fieldId) { case NF_TOPIC_STATES_FIELD_ID: nfSync.setTopicStates(parseTopicStates(buf)); break; case NF_UNICAST_LIST_FIELD_ID: nfSync.setAcceptedUnicastNotifications(parseUnicastIds(buf)); break; case NF_SUBSCRIPTION_ADD_FIELD_ID: parseSubscriptionCommands(nfSync, buf, true); break; case NF_SUBSCRIPTION_REMOVE_FIELD_ID: parseSubscriptionCommands(nfSync, buf, false); break; default: break; } } sync.setNotificationSync(nfSync); }
sync.setTopicListHash(source.getTopicListHash()); if (source.getAcceptedUnicastNotifications() != null) { sync.setAcceptedUnicastNotifications(new ArrayList<>(