private Route thingMessages(final RequestContext ctx, final DittoHeaders dittoHeaders, final String thingId, final String inboxOutbox) { final MessageDirection direction = PATH_INBOX.equalsIgnoreCase(inboxOutbox) ? MessageDirection.TO : MessageDirection.FROM; return rawPathPrefix(mergeDoubleSlashes().concat(PathMatchers.segment(PATH_MESSAGES).slash()), () -> // /messages extractUnmatchedPath(msgSubject -> // <msgSubject/with/slashes> parameterOptional(Unmarshaller.sync(Long::parseLong), TIMEOUT_PARAMETER, optionalTimeout -> withCustomRequestTimeout(optionalTimeout, this::checkMessageTimeout, defaultMessageTimeout, timeout -> extractDataBytes(payloadSource -> handleMessage(ctx, payloadSource, buildSendThingMessage( direction, ctx, dittoHeaders, thingId, msgSubject, timeout ) ) ) ) ) ) ); }
return rawPathPrefix(mergeDoubleSlashes().concat(PathMatchers.segment(PATH_MESSAGES).slash()), extractUnmatchedPath(msgSubject -> // /messages/<msgSubject/with/slashes> parameterOptional(Unmarshaller.sync(Long::parseLong), TIMEOUT_PARAMETER, optionalTimeout ->
route( extractUnmatchedPath(propertyJsonPointerStr -> handlePerRequest(ctx, RetrieveFeatureProperty .of(thingId, featureId, extractDataBytes(payloadSource -> extractUnmatchedPath(propertyJsonPointerStr -> handlePerRequest(ctx, dittoHeaders, payloadSource, propertyJson -> delete(() -> extractUnmatchedPath(propertyJsonPointerStr -> handlePerRequest(ctx, DeleteFeatureProperty .of(thingId, featureId,
extractUnmatchedPath(attributePointerStr -> handlePerRequest(ctx, RetrieveAttribute .of(thingId, JsonFactory.newPointer( dittoHeaders)) extractUnmatchedPath(attributePointerStr -> handlePerRequest(ctx, dittoHeaders, payloadSource, attributeValueJson -> extractUnmatchedPath(attributePointerStr -> handlePerRequest(ctx, DeleteAttribute .of(thingId, JsonFactory.newPointer(
extractUnmatchedPath(resource -> route(