@Experimental @Generated @ThreadSafe @Immutable public class Notifier extends Object implements Serializable, InputLocationTracker
Modifier and Type | Class and Description |
---|---|
static class |
Notifier.Builder
Builder class used to create Notifier instances.
|
Modifier and Type | Method and Description |
---|---|
String |
getAddress()
Deprecated.
|
Map<String,String> |
getConfiguration()
Extended configuration specific to this notifier goes here.
|
InputLocation |
getLocation(Object key)
Gets the location of the specified field in the input source.
|
String |
getType()
The mechanism used to deliver notifications.
|
boolean |
isSendOnError()
Whether to send notifications on error.
|
boolean |
isSendOnFailure()
Whether to send notifications on failure.
|
boolean |
isSendOnSuccess()
Whether to send notifications on success.
|
boolean |
isSendOnWarning()
Whether to send notifications on warning.
|
static Notifier.Builder |
newBuilder()
Creates a new
Notifier builder instance. |
static Notifier.Builder |
newBuilder(boolean withDefaults)
Creates a new
Notifier builder instance using default values or not. |
static Notifier.Builder |
newBuilder(Notifier from)
Creates a new
Notifier builder instance using the specified object as a basis. |
static Notifier.Builder |
newBuilder(Notifier from,
boolean forceCopy)
Creates a new
Notifier builder instance using the specified object as a basis. |
static Notifier |
newInstance()
Creates a new
Notifier instance. |
static Notifier |
newInstance(boolean withDefaults)
Creates a new
Notifier instance using default values or not. |
Notifier.Builder |
with()
Creates a new builder with this object as the basis.
|
Notifier |
withAddress(String address)
Creates a new
Notifier instance using the specified address. |
Notifier |
withConfiguration(Map<String,String> configuration)
Creates a new
Notifier instance using the specified configuration. |
Notifier |
withSendOnError(boolean sendOnError)
Creates a new
Notifier instance using the specified sendOnError. |
Notifier |
withSendOnFailure(boolean sendOnFailure)
Creates a new
Notifier instance using the specified sendOnFailure. |
Notifier |
withSendOnSuccess(boolean sendOnSuccess)
Creates a new
Notifier instance using the specified sendOnSuccess. |
Notifier |
withSendOnWarning(boolean sendOnWarning)
Creates a new
Notifier instance using the specified sendOnWarning. |
Notifier |
withType(String type)
Creates a new
Notifier instance using the specified type. |
public String getType()
String
public boolean isSendOnError()
boolean
public boolean isSendOnFailure()
boolean
public boolean isSendOnSuccess()
boolean
public boolean isSendOnWarning()
boolean
public String getAddress()
String
@Nonnull public Map<String,String> getConfiguration()
Map<String, String>
public InputLocation getLocation(Object key)
getLocation
in interface InputLocationTracker
@Nonnull public Notifier.Builder with()
Builder
@Nonnull public Notifier withType(String type)
Notifier
instance using the specified type.type
- the new String
to useNotifier
with the specified type@Nonnull public Notifier withSendOnError(boolean sendOnError)
Notifier
instance using the specified sendOnError.sendOnError
- the new boolean
to useNotifier
with the specified sendOnError@Nonnull public Notifier withSendOnFailure(boolean sendOnFailure)
Notifier
instance using the specified sendOnFailure.sendOnFailure
- the new boolean
to useNotifier
with the specified sendOnFailure@Nonnull public Notifier withSendOnSuccess(boolean sendOnSuccess)
Notifier
instance using the specified sendOnSuccess.sendOnSuccess
- the new boolean
to useNotifier
with the specified sendOnSuccess@Nonnull public Notifier withSendOnWarning(boolean sendOnWarning)
Notifier
instance using the specified sendOnWarning.sendOnWarning
- the new boolean
to useNotifier
with the specified sendOnWarning@Nonnull public Notifier withAddress(String address)
Notifier
instance using the specified address.address
- the new String
to useNotifier
with the specified address@Nonnull public Notifier withConfiguration(Map<String,String> configuration)
Notifier
instance using the specified configuration.configuration
- the new Map<String, String>
to useNotifier
with the specified configuration@Nonnull public static Notifier newInstance()
Notifier
instance.
Equivalent to newInstance( true )
.Notifier
newInstance(boolean)
@Nonnull public static Notifier newInstance(boolean withDefaults)
Notifier
instance using default values or not.
Equivalent to newBuilder( withDefaults ).build()
.withDefaults
- the boolean indicating whether default values should be usedNotifier
@Nonnull public static Notifier.Builder newBuilder()
Notifier
builder instance.
Equivalent to newBuilder( true )
.Builder
newBuilder(boolean)
@Nonnull public static Notifier.Builder newBuilder(boolean withDefaults)
Notifier
builder instance using default values or not.withDefaults
- the boolean indicating whether default values should be usedBuilder
@Nonnull public static Notifier.Builder newBuilder(Notifier from)
Notifier
builder instance using the specified object as a basis.
Equivalent to newBuilder( from, false )
.from
- the Notifier
instance to use as a basisBuilder
@Nonnull public static Notifier.Builder newBuilder(Notifier from, boolean forceCopy)
Notifier
builder instance using the specified object as a basis.from
- the Notifier
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forcedBuilder
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.