org.jboss.dna.repository.rules
Class RuleSetRepositoryMonitor
java.lang.Object
org.jboss.dna.repository.rules.RuleSetRepositoryMonitor
- All Implemented Interfaces:
- NodeChangeListener
@ThreadSafe
public class RuleSetRepositoryMonitor
- extends java.lang.Object
- implements NodeChangeListener
A component that can listen to a JCR repository and keep the RuleSet
instances of a RuleService
synchronized
with that repository.
This class is a NodeChangeListener
that can subscribe
to
changes in one or more JCR repositories being monitored by an ObservationService
. As changes under the rule sets
branch are discovered, they are processed asynchronously. This ensure that the processing of the repository contents does not
block the other listeners of the ObservationService
.
- Author:
- Randall Hauch
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_JCR_ABSOLUTE_PATH
public static final java.lang.String DEFAULT_JCR_ABSOLUTE_PATH
- See Also:
- Constant Field Values
RuleSetRepositoryMonitor
public RuleSetRepositoryMonitor(RuleService ruleService,
java.lang.String jcrAbsolutePath,
ExecutionContext executionContext)
- Create an instance that can listen to the
RuleSet
definitions stored in a JCR repository and ensure that the
RuleSet
instances of a RuleService
reflect the definitions in the repository.
- Parameters:
ruleService
- the rule service that should be kept in sync with the JCR repository.jcrAbsolutePath
- the absolute path to the branch where the rule sets are defined; if null or empty, the
default path
is usedexecutionContext
- the context in which this monitor is to execute
- Throws:
java.lang.IllegalArgumentException
- if the rule service or execution context is null, or if the supplied
jcrAbsolutePath
is invalid
getRuleService
public RuleService getRuleService()
- Returns:
- ruleService
getAbsolutePathToRuleSets
public java.lang.String getAbsolutePathToRuleSets()
- Returns:
- jcrAbsolutePath
getLogger
public Logger getLogger()
- Returns:
- logger
setLogger
public void setLogger(Logger logger)
- Parameters:
logger
- Sets logger to the specified value.
onNodeChanges
public void onNodeChanges(NodeChanges changes)
-
- Specified by:
onNodeChanges
in interface NodeChangeListener
Copyright © 2008. All Rights Reserved.