@NotThreadSafe public abstract static class ForwarderFilter.Abstract extends Object implements ForwarderFilter
ForwarderFilter.Abstract
Modifier and Type | Field and Description |
---|---|
static String |
FILTER_UUID_PROPERTY
A UUID for the filter.
|
protected static Serializable[] |
NO_MESSAGES
No messages.
|
static String |
WARN_DROPPED_PROPERTY
Warn dropped property.
|
Constructor and Description |
---|
Abstract() |
Modifier and Type | Method and Description |
---|---|
protected Metadata |
getMetadata()
Gets the metadata.
|
protected ForwarderModule |
getModule()
Gets the owner module;
|
protected Logger |
getThisLogger()
Gets the logger.
|
protected Optional<UUID> |
getUUID()
Gets the UUID.
|
protected Optional<PointValue> |
knownPointValue(Serializable message)
Returns the message as a known point value.
|
protected boolean |
loadMetadata(MetadataFilter metadataFilter)
Loads the metadata.
|
protected void |
logDropped(Messages.Entry entry,
Object... params)
Logs a dropped message.
|
boolean |
needsMetadata()
Asks if this filter needs metadata.
|
boolean |
onMetadataRefreshed()
Called when the metadata should be refreshed.
|
protected boolean |
onNewMetadata(Metadata metadata)
Called on new metadata.
|
boolean |
setUp(ForwarderModule forwarderModule,
KeyedGroups filterProperties)
Sets up this filter.
|
void |
tearDown()
Tears down what has been set up.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
filter
public static final String FILTER_UUID_PROPERTY
public static final String WARN_DROPPED_PROPERTY
protected static final Serializable[] NO_MESSAGES
public boolean needsMetadata()
needsMetadata
in interface ForwarderFilter
public boolean onMetadataRefreshed()
onMetadataRefreshed
in interface ForwarderFilter
public boolean setUp(ForwarderModule forwarderModule, KeyedGroups filterProperties)
setUp
in interface ForwarderFilter
forwarderModule
- The owner of this filter.filterProperties
- The filter properties.public void tearDown()
tearDown
in interface ForwarderFilter
@Nonnull @CheckReturnValue protected final Metadata getMetadata()
@Nonnull @CheckReturnValue protected final ForwarderModule getModule()
@Nonnull @CheckReturnValue protected final Logger getThisLogger()
@Nonnull @CheckReturnValue protected Optional<UUID> getUUID()
@Nonnull @CheckReturnValue protected final Optional<PointValue> knownPointValue(@Nonnull Serializable message)
message
- The message.@CheckReturnValue protected final boolean loadMetadata(@Nonnull MetadataFilter metadataFilter)
metadataFilter
- The metadata filter.protected void logDropped(@Nonnull Messages.Entry entry, @Nonnull Object... params)
entry
- The messages entry.params
- The message parameters.@CheckReturnValue protected boolean onNewMetadata(@Nonnull Metadata metadata)
metadata
- The new metadata.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.