Interface ContentAnalyser
public interface ContentAnalyser
The content analyser is responsible to check if a request or response has the correct format i.e. is syntactically
correct, and to transform the content-buffer into a representation that can be validated against a schema.
These two methods are intentionally bundled in ContentAnalyser to prevent some operations from having to
be performed twice. This is particularly helpful if a library is used that cannot distinguish between these steps.
In this case, an intermediate result that was generated in checkSyntacticalCorrectness(), for example,
can be reused.
Therefore, it is very important to ensure that the checkSyntacticalCorrectness() method is always called
before.
-
Method Summary
Modifier and TypeMethodDescriptionvoidChecks if the content has the expected format i.e. is syntactically correct.Transforms the content into a format that can be validated by theRequestValidator, orResponseValidator.
-
Method Details
-
checkSyntacticalCorrectness
Checks if the content has the expected format i.e. is syntactically correct.Throws a
ValidatorExceptionif the content is syntactically incorrect.- Throws:
ValidatorException
-
transform
Object transform()Transforms the content into a format that can be validated by theRequestValidator, orResponseValidator.Throws a
ValidatorExceptionif the content can't be transformed.- Returns:
- the transformed content.
-