private static UserServerSync deepCopy(UserServerSync source) { if (source == null) { return null; } UserServerSync copy = new UserServerSync(); if (source.getEndpointAttachResponses() != null) { copy.setEndpointAttachResponses(new ArrayList<>(source.getEndpointAttachResponses())); } if (source.getEndpointDetachResponses() != null) { copy.setEndpointDetachResponses(new ArrayList<>(source.getEndpointDetachResponses())); } if (source.getUserAttachNotification() != null) { copy.setUserAttachNotification(new UserAttachNotification( source.getUserAttachNotification().getUserExternalId(), source .getUserAttachNotification().getEndpointAccessToken())); } if (source.getUserAttachResponse() != null) { UserAttachResponse uarSource = source.getUserAttachResponse(); copy.setUserAttachResponse(new UserAttachResponse( uarSource.getResult(), uarSource.getErrorCode(), uarSource.getErrorReason())); } if (source.getUserDetachNotification() != null) { copy.setUserDetachNotification(new UserDetachNotification( source.getUserDetachNotification().getEndpointAccessToken())); } return copy; }
source.getUserDetachNotification().getEndpointAccessToken())); if (source.getUserAttachResponse() != null) { sync.setUserAttachResponse(convert(source.getUserAttachResponse()));
return true; if (userResponse.getUserAttachResponse() != null) { return true;
private void encode(GrowingByteBuffer buf, UserServerSync userSync) { buildExtensionHeader(buf, USER_EXTENSION_ID, NOTHING, NOTHING, 0); final int extPosition = buf.position(); if (userSync.getUserAttachResponse() != null) { UserAttachResponse uaResponse = userSync.getUserAttachResponse(); buf.put(USER_ATTACH_RESPONSE_FIELD_ID); buf.put(NOTHING);