Modifier and Type | Class and Description |
---|---|
static interface |
Alert.Dispatcher
Alert dispatcher.
|
Modifier and Type | Field and Description |
---|---|
static String |
ENTITY_FIELD
Entity field key.
|
static String |
INFO_FIELD
Info field key.
|
static String |
NAME_FIELD
Name field key.
|
static String |
SERVICE_FIELD
Service field key.
|
static String |
SOURCE_FIELD
Source field key.
|
static String |
STAMP_FIELD
Stamp field key.
|
static String |
UUID_FIELD
UUID field key.
|
static String |
VISITS_FIELD
Visits field key.
|
SERIALIZABLE_MODE, SIMPLE_STRING_MODE
Modifier | Constructor and Description |
---|---|
protected |
Alert()
Constructs an instance.
|
protected |
Alert(String name,
Optional<String> sourceServiceName,
Optional<String> sourceEntityName,
Optional<UUID> sourceUUID,
Optional<?> info)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addVisit(UUID uuid)
Adds a forwarder as visited by this alert.
|
boolean |
equals(Object other) |
Optional<String> |
getInfo()
Gets the additonal informations.
|
String |
getName()
Gets this alert's name.
|
Optional<String> |
getSourceEntityName()
Gets the name of the source entity generating this alert.
|
Optional<String> |
getSourceServiceName()
Gets the service generating this alert.
|
Optional<UUID> |
getSourceUUID()
Gets the source's UUID.
|
DateTime |
getStamp()
Gets this alert's time stamp.
|
protected abstract String |
getTypeString()
Gets a text string for this alert's type.
|
UUID |
getUUID()
Gets this alert's UUID.
|
int |
hashCode() |
void |
readExternal(ObjectInput input) |
void |
readMap(Map<String,Serializable> map)
Reads a map of the fields.
|
String |
toString() |
void |
writeExternal(ObjectOutput output) |
void |
writeMap(Map<String,Serializable> map)
Writes a map of the fields.
|
public static final String ENTITY_FIELD
public static final String INFO_FIELD
public static final String NAME_FIELD
public static final String SERVICE_FIELD
public static final String SOURCE_FIELD
public static final String STAMP_FIELD
public static final String UUID_FIELD
public static final String VISITS_FIELD
protected Alert()
This is needed for an externalizable implementation.
protected Alert(@Nonnull String name, @Nonnull Optional<String> sourceServiceName, @Nonnull Optional<String> sourceEntityName, @Nonnull Optional<UUID> sourceUUID, @Nonnull Optional<?> info)
name
- The name of this alert.sourceServiceName
- The optional service generating this alert.sourceEntityName
- The optional name of the entity associated with the
source.sourceUUID
- The optional UUID of the source of this alert.info
- Additional optional informations.public final boolean addVisit(@Nonnull UUID uuid)
uuid
- The UUID of the forwarder.public boolean equals(Object other)
equals
in class Object
@Nonnull @CheckReturnValue public final Optional<String> getInfo()
@Nonnull @CheckReturnValue public final String getName()
@Nonnull @CheckReturnValue public final Optional<String> getSourceEntityName()
@Nonnull @CheckReturnValue public final Optional<String> getSourceServiceName()
@Nonnull @CheckReturnValue public final Optional<UUID> getSourceUUID()
@Nonnull @CheckReturnValue public final DateTime getStamp()
@Nonnull @CheckReturnValue public final UUID getUUID()
public int hashCode()
hashCode
in class Object
public void readExternal(ObjectInput input) throws IOException
readExternal
in interface Externalizable
IOException
public void readMap(Map<String,Serializable> map)
public final String toString()
toString
in class Object
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
IOException
public void writeMap(Map<String,Serializable> map)
@Nonnull @CheckReturnValue protected abstract String getTypeString()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.