public class SourceSerializerChain extends java.lang.Object implements SourceSerializer
SourceSerializerimplementation that chains together multiple source serializers. When a caller passes
Messageto this serializer, it calls all the serializers in the chain, in the original order specified, until one can parse and return
CloudTrailSource. If all source serializers in the chain are called, and they cannot successfully parse the message, then this class throws an
IOExceptionthat indicates that no sources are available.
This class remembers the first source serializer in the chain that can successfully parse messages, and will continue to use that serializer when there are future messages.
|Constructor and Description|
Constructs a new
|Modifier and Type||Method and Description|
Get CloudTrail log file information by parsing single SQS message.
public SourceSerializerChain(java.util.List<? extends SourceSerializer> sourceSerializers)
SourceSerializerChainwith the specified source serializers.
SourceSerializerFactory.createSourceSerializerChain() for default construction.
When source are required from this serializer, it will call each of these source serializers in the same order
specified here until one of them return
sourceSerializers- A list of at least one
public CloudTrailSource getSource(Message sqsMessage) throws java.io.IOException