/** * A mutable builder for a {@code UnknownTopicPathException}. * * @param topicPath the topic path of the adaptable not supported. * @return the builder. */ public static Builder newBuilder(final TopicPath topicPath) { return new Builder(topicPath.getPath()); }
/** * A mutable builder for a {@code UnknownTopicPathException}. * * @param topicPath the topic path of the adaptable not supported. * @return the builder. */ public static Builder newBuilder(final TopicPath topicPath) { return new Builder(topicPath.getPath()); }
return Optional.of(topicPath.getPath()); default: return Optional.empty();
@Test public void testReplaceFull() { assertThat(UNDER_TEST.apply(KNOWN_TOPIC_PATH, "full")).contains(KNOWN_TOPIC_PATH.getPath()); }
@Override public JsonObject toJson(final DittoHeaders specificHeaders) { final JsonObjectBuilder jsonObjectBuilder = JsonFactory.newObjectBuilder(); if (!getTopicPath().equals(ProtocolFactory.emptyTopicPath())) { jsonObjectBuilder.set(JsonFields.TOPIC, getTopicPath().getPath()); } return jsonObjectBuilder .set(JsonFields.HEADERS, specificHeaders.toJson()) .setAll(getPayload().toJson()) .build(); }
@Override public JsonObject toJson(final DittoHeaders specificHeaders) { final JsonObjectBuilder jsonObjectBuilder = JsonFactory.newObjectBuilder(); if (!getTopicPath().equals(ProtocolFactory.emptyTopicPath())) { jsonObjectBuilder.set(JsonFields.TOPIC, getTopicPath().getPath()); } return jsonObjectBuilder .set(JsonFields.HEADERS, specificHeaders.toJson()) .setAll(getPayload().toJson()) .build(); }