use of com.sequenceiq.cloudbreak.structuredevent.event.StructuredRestCallEvent in project cloudbreak by hortonworks.
the class LegacyKafkaStructuredEventHandler method sanitizeSensitiveRestData.
protected void sanitizeSensitiveRestData(StructuredEvent event) {
if ("StructuredRestCallEvent".equals(event.getType())) {
StructuredRestCallEvent restEvent = (StructuredRestCallEvent) event;
RestRequestDetails restRequestDetails = restEvent.getRestCall().getRestRequest();
restRequestDetails.setBody(REPLACEMENT);
restRequestDetails.setHeaders(new HashMap());
RestResponseDetails restResponseDetails = restEvent.getRestCall().getRestResponse();
restResponseDetails.setBody(REPLACEMENT);
restResponseDetails.setHeaders(new HashMap<>());
}
}
Aggregations