Methods Summary |
---|
public java.util.ArrayList | getConfigChangeList()Get config changes list. The list contains objects of type ConfigAdd,
ConfigUpdate or ConfigDelete from package com.sun.enterprise.config (all
of them are sub-classes of ConfigChange). In some cases, this event may
be created by specifying null for Config change list and if no changes
are added post creation by invoking package method addConfigChange then
this method will return null.
return configChangeList;
|
boolean | isAllXPathMatched()Is all xpath in this event matched to at least one listener. The event
contains a list of config changes and if xpaths for all the changes are
mactehd to at least one listener then the method returns true. If change
list is empty then the method returns false.
boolean matched = true;
if (configChangeList == null || matchMap == null) {
matched = false;
return matched;
}
Iterator iter = configChangeList.iterator();
while (iter.hasNext()) {
if (!matchMap.containsKey(iter.next())) {
matched = false;
break;
}
}
return matched;
|
boolean | isInitOrObjConfChanged()Is init.conf or obj.conf changed. If true, then a restart will be
required to handle this change.
return initOrObjConfChanged;
|
boolean | isNoOp()Is this event no op. A ConfigChangeEvent is no op, if it does not have
any server.xml changes or if it has not been told that web core
reconfig is needed.
boolean isNoOp = false;
if (configChangeList == null && !webCoreReconfigNeeded) {
isNoOp = true;
}
return isNoOp;
|
boolean | isWebCoreReconfigNeeded()Is web core reconfig needed. Web core reconfig is needed if init.conf,
obj.conf or mime type files have been changed or if server.xml elements
http-service or web-container have been changed.
return webCoreReconfigNeeded;
|
boolean | matchXPathToPattern(java.util.regex.Pattern pattern)Match the specified regular expression pattern against all changed XPath
associated to the event.
boolean match = false;
if (configChangeList == null) {
return match;
}
Iterator iter = configChangeList.iterator();
while (iter.hasNext()) {
ConfigChange change = (ConfigChange)iter.next();
String xpath = change.getXPath();
if (xpath != null) {
Matcher matcher = pattern.matcher(xpath);
match = matcher.matches();
if (match) {
setConfigChangeMatched(change);
}
}
}
return match;
|
private void | setConfigChangeMatched(com.sun.enterprise.config.ConfigChange change)Set specified config change as matched. This method is called when the
change xpath matches a pattern from a ConfigChangeEvent listener.
synchronized (this) {
if (matchMap == null) {
matchMap = new HashMap();
}
}
matchMap.put(change, change);
|
void | setInitOrObjConfChanged(boolean changed)Set whether init.conf or obj.conf files have changed.
initOrObjConfChanged = changed;
|
void | setWebCoreReconfigNeeded(boolean reconfig)Set web core reconfig needed status. Some of the changes are handled
by reconfig signal in web core. Setting the status to true results in
invokation of web core reconfig.
webCoreReconfigNeeded = reconfig;
|