use of com.datastax.dse.driver.internal.core.insights.exceptions.InsightEventFormatException in project java-driver by datastax.
the class InsightsClient method createStartupMessage.
@VisibleForTesting
String createStartupMessage() {
InsightMetadata insightMetadata = createMetadata(STARTUP_MESSAGE_NAME, STARTUP_VERSION_1_ID);
InsightsStartupData data = createStartupData();
try {
return OBJECT_MAPPER.writeValueAsString(new Insight<>(insightMetadata, data));
} catch (JsonProcessingException e) {
throw new InsightEventFormatException("Problem when creating: " + STARTUP_MESSAGE_NAME, e);
}
}
use of com.datastax.dse.driver.internal.core.insights.exceptions.InsightEventFormatException in project java-driver by datastax.
the class InsightsClient method createStatusMessage.
@VisibleForTesting
String createStatusMessage() {
InsightMetadata insightMetadata = createMetadata(STATUS_MESSAGE_NAME, STATUS_VERSION_1_ID);
InsightsStatusData data = createStatusData();
try {
return OBJECT_MAPPER.writeValueAsString(new Insight<>(insightMetadata, data));
} catch (JsonProcessingException e) {
throw new InsightEventFormatException("Problem when creating: " + STATUS_MESSAGE_NAME, e);
}
}
Aggregations