private void encode(GrowingByteBuffer buf, ProfileServerSync profileSync) { buildExtensionHeader(buf, PROFILE_EXTENSION_ID, NOTHING, (profileSync.getResponseStatus() == SyncResponseStatus.RESYNC ? RESYNC : NOTHING), 0); }
private void encode(GrowingByteBuffer buf, RedirectServerSync redirectSync) { buildExtensionHeader(buf, EVENT_EXTENSION_ID, NOTHING, NOTHING, 4); buf.putInt(redirectSync.getAccessPointId()); }
option |= 0x02; buildExtensionHeader(buf, CONFIGURATION_EXTENSION_ID, NOTHING, (byte) option, 0); final int extPosition = buf.position();
private void encodeMetaData(GrowingByteBuffer buf, ServerSync sync) { buildExtensionHeader(buf, META_DATA_EXTENSION_ID, NOTHING, NOTHING, 8); buf.putInt(sync.getRequestId()); buf.putInt(sync.getStatus().ordinal()); }
private void encode(GrowingByteBuffer buf, LogServerSync logSync) { List<LogDeliveryStatus> statusList = logSync.getDeliveryStatuses(); int extensionSize = 4; if (statusList != null) { extensionSize += 4 * statusList.size(); } buildExtensionHeader(buf, LOGGING_EXTENSION_ID, NOTHING, NOTHING, extensionSize); if (statusList != null && !statusList.isEmpty()) { buf.putInt(statusList.size()); for (LogDeliveryStatus status : statusList) { buf.putShort((short) status.getRequestId()); buf.put(status.getResult() == SyncStatus.SUCCESS ? SUCCESS : FAILURE); buf.put(status.getErrorCode() != null ? (byte) status.getErrorCode().ordinal() : NOTHING); } } else { buf.putInt(0); } }
private void encode(GrowingByteBuffer buf, BootstrapServerSync bootstrapSync) { buildExtensionHeader(buf, BOOTSTRAP_EXTENSION_ID, NOTHING, NOTHING, 0); final int extPosition = buf.position(); buf.putShort((short) bootstrapSync.getRequestId()); buf.putShort((short) bootstrapSync.getProtocolList().size()); for (ProtocolConnectionData data : bootstrapSync.getProtocolList()) { buf.putInt(data.getAccessPointId()); buf.putInt(data.getProtocolId()); buf.putShort((short) data.getProtocolVersion()); buf.putShort((short) data.getConnectionData().length); put(buf, data.getConnectionData()); } buf.putInt(extPosition - SIZE_OF_INT, buf.position() - extPosition); }
option = 1; buildExtensionHeader(buf, EVENT_EXTENSION_ID, NOTHING, option, 0); final int extPosition = buf.position();
private void encode(GrowingByteBuffer buf, NotificationServerSync notificationSync) { buildExtensionHeader(buf, NOTIFICATION_EXTENSION_ID, NOTHING, NOTHING, 0); final int extPosition = buf.position();
private void encode(GrowingByteBuffer buf, UserServerSync userSync) { buildExtensionHeader(buf, USER_EXTENSION_ID, NOTHING, NOTHING, 0); final int extPosition = buf.position(); if (userSync.getUserAttachResponse() != null) {