public abstract class AbstractEventSerializer extends java.lang.Object implements EventSerializer
| Constructor and Description |
|---|
AbstractEventSerializer(JsonParser jsonParser)
Construct an AbstractEventSerializer object
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the JSON parser object used to read the CloudTrail log.
|
abstract CloudTrailEventMetadata |
getMetadata(int charStart,
int charEnd)
An abstract class that returns an
CloudTrailEventMetadata object. |
CloudTrailEvent |
getNextEvent()
Get the next event from the CloudTrail log and parse it.
|
boolean |
hasNextEvent()
Indicates whether the CloudTrail log has more events to read.
|
protected void |
readArrayHeader()
Read the header of an AWS CloudTrail log.
|
public AbstractEventSerializer(JsonParser jsonParser)
throws java.io.IOException
jsonParser - a Jackson
JsonParser object to
use for interpreting JSON objects.java.io.IOException - under no conditions.public abstract CloudTrailEventMetadata getMetadata(int charStart, int charEnd)
CloudTrailEventMetadata object.charStart - the character count at which to begin reading event data.charEnd - the character count at which to stop reading event data.protected void readArrayHeader()
throws java.io.IOException
JsonParseException - if the log could not be parsed.java.io.IOException - if the log could not be opened or accessed.public boolean hasNextEvent()
throws java.io.IOException
hasNextEvent in interface EventSerializertrue if the log contains more events; false otherwise.java.io.IOException - if the log could not be opened or accessed.public void close()
throws java.io.IOException
close in interface EventSerializerclose in interface java.lang.AutoCloseablejava.io.IOException - if the log could not be opened or accessed.public CloudTrailEvent getNextEvent() throws java.io.IOException
getNextEvent in interface EventSerializerCloudTrailEvent that represents the
parsed event.java.io.IOException - if the event could not be parsed.