private void parseUserClientSync(ClientSync sync, ByteBuffer buf, int options, int payloadLength) { int payloadLimitPosition = buf.position() + payloadLength; UserClientSync userSync = new UserClientSync(); while (buf.position() < payloadLimitPosition) { byte fieldId = buf.get(); switch (fieldId) { case USER_ATTACH_FIELD_ID: userSync.setUserAttachRequest(parseUserAttachRequest(buf)); break; case ENDPOINT_ATTACH_FIELD_ID: userSync.setEndpointAttachRequests(parseEndpointAttachRequests(buf)); break; case ENDPOINT_DETACH_FIELD_ID: userSync.setEndpointDetachRequests(parseEndpointDetachRequests(buf)); break; default: break; } } sync.setUserSync(userSync); }
/** * Updates a request. */ public void updateRequest(ServerSync response) { UUID channelUuid = getChannelUuid(); LOG.debug("[{}] Cleanup profile request", channelUuid); request.setProfileSync(null); if (request.getUserSync() != null) { LOG.debug("[{}] Cleanup user request", channelUuid); request.setUserSync(new UserClientSync()); } if (request.getEventSync() != null) { LOG.debug("[{}] Cleanup event request", channelUuid); request.setEventSync(new EventClientSync()); } if (request.getLogSync() != null) { LOG.debug("[{}] Cleanup log request", channelUuid); request.getLogSync().setLogEntries(null); } if (request.getNotificationSync() != null) { LOG.debug("[{}] Cleanup/update notification request", channelUuid); request.getNotificationSync().setSubscriptionCommands(null); request.getNotificationSync().setAcceptedUnicastNotifications(null); } }
return null; UserClientSync sync = new UserClientSync(); if (source.getUserAttachRequest() != null) { sync.setUserAttachRequest(new UserAttachRequest(