public class PropertiesFileConfiguration extends java.lang.Object implements ProcessingConfiguration
In addition to this class, you can use ClientConfiguration
to manually set configuration options.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS_KEY |
static java.lang.String |
DELETE_MESSAGE_UPON_FAILURE |
static java.lang.String |
ENABLE_RAW_EVENT_INFO |
static java.lang.String |
MAX_EVENTS_PER_EMIT |
static java.lang.String |
NUM_OF_PARALLEL_READERS |
static java.lang.String |
S3_REGION |
static java.lang.String |
SECRET_KEY |
static java.lang.String |
SQS_REGION |
static java.lang.String |
SQS_URL |
static java.lang.String |
THREAD_COUNT |
static java.lang.String |
THREAD_TERMINATION_DELAY_SECONDS |
static java.lang.String |
VISIBILITY_TIMEOUT |
DEFAULT_DELETE_MESSAGE_UPON_FAILURE, DEFAULT_ENABLE_RAW_EVENT_INFO, DEFAULT_MAX_EVENTS_PER_EMIT, DEFAULT_NUM_OF_PARALLEL_READERS, DEFAULT_S3_REGION, DEFAULT_SQS_REGION, DEFAULT_THREAD_COUNT, DEFAULT_THREAD_TERMINATION_DELAY_SECONDS, DEFAULT_VISIBILITY_TIMEOUT
Constructor and Description |
---|
PropertiesFileConfiguration(java.lang.String propertiesFile)
Creates a
PropertiesFileConfiguration from values provided in a classpath properties file. |
Modifier and Type | Method and Description |
---|---|
AWSCredentialsProvider |
getAwsCredentialsProvider()
Get the AWS Credentials provider used to access AWS.
|
int |
getMaxEventsPerEmit()
Get the maximum number of AWSCloudTrailClientEvents sent to a single invocation of processEvents().
|
int |
getNumOfParallelReaders()
Get a number of reader threads
|
java.lang.String |
getS3Region()
Get the AWS S3 Region.
|
java.lang.String |
getSqsRegion()
Gets the SQS Region from which CloudTrail logs are obtained.
|
java.lang.String |
getSqsUrl()
Gets the SQS URL used to obtain CloudTrail logs.
|
int |
getThreadCount()
Get the number of threads used to download S3 files in parallel.
|
int |
getThreadTerminationDelaySeconds()
Get the thread termination delay value.
|
int |
getVisibilityTimeout()
Get the visibility timeout value for the SQS queue.
|
boolean |
isDeleteMessageUponFailure()
Indicates whether to delete SQS messages when there is a failure during
SqsManager.parseMessage(List)
and EventReader.processSource(CloudTrailSource) . |
boolean |
isEnableRawEventInfo()
Indicates whether raw event information is returned in
CloudTrailEventMetadata . |
void |
validate()
Validate that all necessary parameters are set in the provided configuration.
|
public static final java.lang.String ACCESS_KEY
public static final java.lang.String SECRET_KEY
public static final java.lang.String SQS_URL
public static final java.lang.String SQS_REGION
public static final java.lang.String VISIBILITY_TIMEOUT
public static final java.lang.String S3_REGION
public static final java.lang.String THREAD_COUNT
public static final java.lang.String NUM_OF_PARALLEL_READERS
public static final java.lang.String THREAD_TERMINATION_DELAY_SECONDS
public static final java.lang.String MAX_EVENTS_PER_EMIT
public static final java.lang.String ENABLE_RAW_EVENT_INFO
public static final java.lang.String DELETE_MESSAGE_UPON_FAILURE
public PropertiesFileConfiguration(java.lang.String propertiesFile)
PropertiesFileConfiguration
from values provided in a classpath properties file.propertiesFile
- the classpath properties file to load.public AWSCredentialsProvider getAwsCredentialsProvider()
getAwsCredentialsProvider
in interface ProcessingConfiguration
public java.lang.String getSqsUrl()
getSqsUrl
in interface ProcessingConfiguration
public java.lang.String getSqsRegion()
getSqsRegion
in interface ProcessingConfiguration
public int getVisibilityTimeout()
The period of time during which Amazon SQS prevents other consuming components from receiving and processing a message.
getVisibilityTimeout
in interface ProcessingConfiguration
public java.lang.String getS3Region()
getS3Region
in interface ProcessingConfiguration
public int getThreadCount()
getThreadCount
in interface ProcessingConfiguration
public int getNumOfParallelReaders()
getNumOfParallelReaders
in interface ProcessingConfiguration
public int getThreadTerminationDelaySeconds()
getThreadTerminationDelaySeconds
in interface ProcessingConfiguration
public int getMaxEventsPerEmit()
getMaxEventsPerEmit
in interface ProcessingConfiguration
public boolean isEnableRawEventInfo()
CloudTrailEventMetadata
.isEnableRawEventInfo
in interface ProcessingConfiguration
true
if raw event information is enabled; false
otherwise.public boolean isDeleteMessageUponFailure()
SqsManager.parseMessage(List)
and EventReader.processSource(CloudTrailSource)
.
The SQS message will be deleted upon success regardless of the setting for deleteMessageUponFailure.isDeleteMessageUponFailure
in interface ProcessingConfiguration
true
if delete SQS message upon failure is enabled. Otherwise, false
.public void validate()
This method throws an exception if any of the required parameters are null
.
validate
in interface ProcessingConfiguration