org.apache.jackrabbit.spi.commons
Class EventFilterImpl
java.lang.Object
org.apache.jackrabbit.spi.commons.EventFilterImpl
- All Implemented Interfaces:
- Serializable, EventFilter
public class EventFilterImpl
- extends Object
- implements EventFilter, Serializable
EventFilterImpl
is the simple bean style implementation of an
EventFilter
.
- See Also:
- Serialized Form
Constructor Summary |
EventFilterImpl(int eventTypes,
Path absPath,
boolean isDeep,
String[] uuids,
Set nodeTypeNames,
boolean noLocal)
Creates a new EventFilterImpl . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventFilterImpl
public EventFilterImpl(int eventTypes,
Path absPath,
boolean isDeep,
String[] uuids,
Set nodeTypeNames,
boolean noLocal)
- Creates a new
EventFilterImpl
.
- Parameters:
eventTypes
- the event types this filter is interested in.absPath
- filter events that are below this path.isDeep
- whether this filter is applied deep.uuids
- the jcr:uuid of the nodes this filter allows.nodeTypeNames
- the Names of the already resolved node types this
filter allows.noLocal
- whether this filter accepts local events or not.
accept
public boolean accept(Event event,
boolean isLocal)
- If an implementation returns
true
the event
will be included in the event bundle returned by RepositoryService.getEvents(Subscription, long)
. A return
value of false
indicates that the client is not interested
in the event
.
- Specified by:
accept
in interface EventFilter
- Parameters:
event
- the event in question.isLocal
- flag indicating whether this is a local event.
- Returns:
true
if the event is accepted by the filter;
false
otherwise.
getEventTypes
public int getEventTypes()
- Returns:
- the event types this event filter accepts.
isDeep
public boolean isDeep()
- Returns:
true
if this event filter is deep.
getAbsPath
public Path getAbsPath()
- Returns:
- the path to the item where events are filtered.
getUUIDs
public String[] getUUIDs()
- Returns:
- the uuids of the nodes of this filter or
null
if
this filter does not care about uuids.
getNodeTypeNames
public Set getNodeTypeNames()
- Returns:
- an unmodifiable set of node type names or
null
if
this filter does not care about node types.
getNoLocal
public boolean getNoLocal()
- Returns:
- if this filter accepts local events.
Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.