public abstract class NotificationConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Set<java.lang.String> |
events
Set of events for a notification configuration.
|
private Filter |
filter |
private java.util.List<java.lang.String> |
objectPrefixes
Deprecated.
This field is not used by S3. It will be removed in the next major version of the
SDK
|
Modifier | Constructor and Description |
---|---|
protected |
NotificationConfiguration()
Creates a NotificationConfiguration with empty events and prefixes.
|
protected |
NotificationConfiguration(java.util.EnumSet<S3Event> events)
Creates a notification configuration with the given set of events.
|
protected |
NotificationConfiguration(java.lang.String... events)
Creates a notification configuration with the given set of events.
|
Modifier and Type | Method and Description |
---|---|
void |
addEvent(S3Event event)
Adds the given event to the set of events for this
NotificationConfiguration object. |
void |
addEvent(java.lang.String event)
Adds the given event to the set of events for this
NotificationConfiguration object. |
void |
addObjectPrefix(java.lang.String prefix)
Deprecated.
This field is not used by S3. It will be removed in the next major version of the
SDK
|
java.util.Set<java.lang.String> |
getEvents()
Returns the set of events associated with this notification configuration.
|
Filter |
getFilter()
Filter criteria for determining which S3 objects trigger event notifications.
|
java.util.List<java.lang.String> |
getObjectPrefixes()
Deprecated.
This field is not used by S3. It will be removed in the next major version of the
SDK. See
getFilter() for the correct way to filter notifications. |
void |
setEvents(java.util.Set<java.lang.String> events)
Sets the given events in this
NotificationConfiguration object. |
void |
setFilter(Filter filter)
Sets the filter criteria for this
NotificationConfiguration . |
void |
setObjectPrefixes(java.util.List<java.lang.String> objectPrefixes)
Deprecated.
This field is not used by S3. It will be removed in the next major version of the
SDK. See
setFilter(Filter) for the correct way to filter notifications. |
NotificationConfiguration |
withEvents(java.util.Set<java.lang.String> events)
Sets the given events in this
NotificationConfiguration object and returns this
object. |
NotificationConfiguration |
withFilter(Filter filter)
Sets the filter criteria for this
NotificationConfiguration and returns this object
for method chaining. |
NotificationConfiguration |
withObjectPrefixes(java.lang.String... objectPrefixes)
Deprecated.
This field is not used by S3. It will be removed in the next major version of the
SDK. See
withFilter(Filter) for the correct way to filter notifications. |
private java.util.Set<java.lang.String> events
@Deprecated private java.util.List<java.lang.String> objectPrefixes
private Filter filter
protected NotificationConfiguration()
protected NotificationConfiguration(java.util.EnumSet<S3Event> events)
events
- the list of events for the notification configuration.protected NotificationConfiguration(java.lang.String... events)
events
- the list of events for the notification configuration.public java.util.Set<java.lang.String> getEvents()
public void setEvents(java.util.Set<java.lang.String> events)
NotificationConfiguration
object.events
- the set of events for the notification configuration.@Deprecated public java.util.List<java.lang.String> getObjectPrefixes()
getFilter()
for the correct way to filter notifications.@Deprecated public void setObjectPrefixes(java.util.List<java.lang.String> objectPrefixes)
setFilter(Filter)
for the correct way to filter notifications.public NotificationConfiguration withEvents(java.util.Set<java.lang.String> events)
NotificationConfiguration
object and returns this
object.events
- the set of events for the notification configuration.@Deprecated public NotificationConfiguration withObjectPrefixes(java.lang.String... objectPrefixes)
withFilter(Filter)
for the correct way to filter notifications.public void addEvent(java.lang.String event)
NotificationConfiguration
object.event
- the event to add to this notification configurationpublic void addEvent(S3Event event)
NotificationConfiguration
object.event
- the event to add to this notification configuration@Deprecated public void addObjectPrefix(java.lang.String prefix)
public Filter getFilter()
Filter
object associated with this NotificationConfiguration
public void setFilter(Filter filter)
NotificationConfiguration
.filter
- New Filter
public NotificationConfiguration withFilter(Filter filter)
NotificationConfiguration
and returns this object
for method chaining.filter
- New Filter