private void updateResponseWithUserAttachResults(ServerSync response, UserVerificationResponseMessage message) { if (response.getUserSync() == null) { response.setUserSync(new UserServerSync()); } response.getUserSync().setUserAttachResponse(EntityConvertUtils.convert(message)); }
ServerSync pendingResponse = channel.getResponseHolder().getResponse(); UserServerSync userSyncResponse = pendingResponse.getUserSync();
private void notifyAffectedEndpoints(ActorContext context, ClientSync request, SyncContext responseHolder) { if (responseHolder.getResponse().getUserSync() != null) { List<EndpointAttachResponse> attachResponses = responseHolder.getResponse() .getUserSync() .getEndpointAttachResponses(); if (attachResponses != null && !attachResponses.isEmpty()) { for (EndpointDetachRequest detachRequest : detachRequests) { List<EndpointDetachResponse> endpointDetachResponses = responseHolder.getResponse() .getUserSync() .getEndpointDetachResponses(); for (EndpointDetachResponse detachResponse : endpointDetachResponses) {
if (response.getUserSync() != null) { UserServerSync userResponse = response.getUserSync(); if (userResponse.getEndpointAttachResponses() != null && !userResponse.getEndpointAttachResponses().isEmpty()) {
extensionCount++; if (sync.getUserSync() != null) { encode(buf, sync.getUserSync()); extensionCount++;
/** * make deep copy of <code>ServerSync</code> instance. * * @param source is source for copping * @return deep copy of <code>ServerSync</code> instance */ public static ServerSync deepCopy(ServerSync source) { if (source == null) { return null; } ServerSync copy = new ServerSync(); copy.setRequestId(source.getRequestId()); copy.setStatus(source.getStatus()); copy.setUserSync(deepCopy(source.getUserSync())); copy.setRedirectSync(deepCopy(source.getRedirectSync())); copy.setProfileSync(deepCopy(source.getProfileSync())); copy.setNotificationSync(deepCopy(source.getNotificationSync())); copy.setLogSync(deepCopy(source.getLogSync())); copy.setEventSync(deepCopy(source.getEventSync())); copy.setConfigurationSync(deepCopy(source.getConfigurationSync())); return copy; }
/** * Converts {@link ServerSync} to Avro {@link SyncResponse}. * * @param source the server sync * @return the Avro sync response */ public static SyncResponse convert(ServerSync source) { SyncResponse sync = new SyncResponse(); sync.setRequestId(source.getRequestId()); sync.setStatus(convert(source.getStatus())); sync.setBootstrapSyncResponse(convert(source.getBootstrapSync())); sync.setRedirectSyncResponse(convert(source.getRedirectSync())); sync.setProfileSyncResponse(convert(source.getProfileSync())); sync.setConfigurationSyncResponse(convert(source.getConfigurationSync())); sync.setNotificationSyncResponse(convert(source.getNotificationSync())); sync.setEventSyncResponse(convert(source.getEventSync())); sync.setUserSyncResponse(convert(source.getUserSync())); sync.setLogSyncResponse(convert(source.getLogSync())); return sync; }