public class EventFilterRule extends Object implements Serializable
Constructor and Description |
---|
EventFilterRule()
Create new empty
EventFilterRule |
public EventFilterRule()
EventFilterRule
public Boolean matches(Event e)
e
- Event to match against rulepublic EventFilterRule except(EventFilterRule r)
Even if the filter rule matches, if the event also matches anything in the negation list it will not match the rule.
r
- EventFilterRule
to add to negation listpublic void setExceptRules(ArrayList<EventFilterRule> erules)
erules
- List of EventFilterRule
for exceptionspublic ArrayList<EventFilterRule> getExceptRules()
EventFilterRule
public EventFilterRule addPayloadFilter(EventFilterPayloadInterface p)
p
- Payload filter criteriapublic void setPayloadFilters(ArrayList<EventFilterPayloadInterface> filters)
filters
- Array of EventFilterPayloadInterface
public ArrayList<EventFilterPayloadInterface> getPayloadFilters()
public EventFilterRule wantSubtype(Payload.PayloadType p)
p
- Payload typepublic Payload.PayloadType getWantSubtype()
public EventFilterRule wantStackdriverProject(String project)
If this rule is installed, an event will only match if it is an event from Stackdriver and the project matches the supplied argument.
project
- Project name to match againstpublic String getWantStackdriverProject()
public EventFilterRule wantStackdriverLabel(String key, String value)
If this rule is installed, an event will only match if it is an event from Stackdriver and has a label with the specified key and value.
key
- Label keyvalue
- Label valuepublic void setWantStackdriverLabels(Map<String,String> labels)
labels
- Map of key/value pairspublic Map<String,String> getWantStackdriverLabels()
public EventFilterRule wantNormalizedType(Normalized.Type n)
n
- Normalized event typepublic Normalized.Type getWantNormalizedType()
Copyright © 2022. All rights reserved.