private void parseBootstrapClientSync(ClientSync sync, ByteBuffer buf, int options, int payloadLength) { int requestId = buf.getShort(); int protocolCount = buf.getShort(); List<ProtocolVersionId> keys = new ArrayList<>(protocolCount); for (int i = 0; i < protocolCount; i++) { keys.add(new ProtocolVersionId(buf.getInt(), buf.getShort())); // reserved buf.getShort(); } sync.setBootstrapSync(new BootstrapClientSync(requestId, keys)); }
@Override public void run() { MessageEncoderDecoder crypt = getOrInitCrypt(); Map<Integer, PlatformEncDec> platformEncDecMap = getOrInitMap(platformProtocols); try { ClientSync request = decodeRequest(message, crypt, platformEncDecMap); LOG.trace("Processing request {}", request); BootstrapClientSync bsRequest = request.getBootstrapSync(); Set<ProtocolConnectionData> transports = opsListService.filter(bsRequest.getKeys()); BootstrapServerSync bsResponse = new BootstrapServerSync( bsRequest.getRequestId(), transports); ServerSync response = new ServerSync(); response.setRequestId(request.getRequestId()); response.setStatus(SyncStatus.SUCCESS); response.setBootstrapSync(bsResponse); LOG.trace("Response {}", response); encodeAndForward(message, crypt, platformEncDecMap, response); LOG.trace("Response forwarded to specific transport {}", response); } catch (Exception ex) { processErrors(message.getChannelContext(), message.getErrorBuilder(), ex); } }
? !bootstrapSync.equals(that.bootstrapSync) : that.bootstrapSync != null) { return false;
@Override public int hashCode() { int result = requestId; result = 31 * result + (clientSyncMetaData != null ? clientSyncMetaData.hashCode() : 0); result = 31 * result + (bootstrapSync != null ? bootstrapSync.hashCode() : 0); result = 31 * result + (profileSync != null ? profileSync.hashCode() : 0); result = 31 * result + (forceConfigurationSync ? 1 : 0); result = 31 * result + (configurationSync != null ? configurationSync.hashCode() : 0); result = 31 * result + (forceNotificationSync ? 1 : 0); result = 31 * result + (notificationSync != null ? notificationSync.hashCode() : 0); result = 31 * result + (userSync != null ? userSync.hashCode() : 0); result = 31 * result + (eventSync != null ? eventSync.hashCode() : 0); result = 31 * result + (logSync != null ? logSync.hashCode() : 0); result = 31 * result + (useConfigurationRawSchema ? 1 : 0); return result; }
private static BootstrapClientSync convert(BootstrapSyncRequest source) { if (source == null) { return null; } return new BootstrapClientSync(source.getRequestId(), convert(source.getSupportedProtocols())); }