E
- the type of the MessageEnvelope
to validatepublic interface EnvelopeValidator<E extends MessageEnvelope<?,?,?>>
MessageEnvelope
.Modifier and Type | Method and Description |
---|---|
java.util.Optional |
validate(E envelope)
Validates the given
MessageEnvelope by some specific rules. |
java.util.Optional validate(E envelope)
MessageEnvelope
by some specific rules.envelope
- the envelope to validateOptional.empty()
if the envelope passes the validation or the cause of
the validation errorfor the detailed description of the returned value