use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class AbstractPipe method registerForward.
/**
* Register a PipeForward object to this Pipe. Global Forwards are added
* by the PipeLine. If a forward is already registered, it logs a warning.
* @param forward
* @see nl.nn.adapterframework.core.PipeLine
* @see PipeForward
*/
@Override
public void registerForward(PipeForward forward) {
PipeForward current = pipeForwards.get(forward.getName());
if (current == null) {
pipeForwards.put(forward.getName(), forward);
} else {
if (!isRecoverAdapter()) {
if (forward.getPath().equals(current.getPath())) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix(null) + "PipeForward [" + forward.getName() + "] pointing to [" + forward.getPath() + "] already registered";
configWarnings.add(log, msg);
} else {
log.info(getLogPrefix(null) + "PipeForward [" + forward.getName() + "] already registered, pointing to [" + current.getPath() + "]. Ignoring new one, that points to [" + forward.getPath() + "]");
}
}
}
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class AbstractPipe method configure.
/**
* <code>configure()</code> is called after the {@link nl.nn.adapterframework.core.PipeLine Pipeline} is registered
* at the {@link nl.nn.adapterframework.core.Adapter Adapter}. Purpose of this method is to reduce
* creating connections to databases etc. in the {@link #doPipe(Object) doPipe()} method.
* As much as possible class-instantiating should take place in the
* <code>configure()</code> method, to improve performance.
*/
@Override
public void configure() throws ConfigurationException {
ParameterList params = getParameterList();
if (params != null) {
try {
params.configure();
} catch (ConfigurationException e) {
throw new ConfigurationException(getLogPrefix(null) + "while configuring parameters", e);
}
}
if (!StringUtils.isEmpty(getElementToMove()) && !StringUtils.isEmpty(getElementToMoveChain())) {
throw new ConfigurationException(getLogPrefix(null) + "cannot have both an elementToMove and an elementToMoveChain specified");
}
if (pipeForwards.isEmpty()) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix(null) + "has no forwards defined.";
configWarnings.add(log, msg);
} else {
for (Iterator<String> it = pipeForwards.keySet().iterator(); it.hasNext(); ) {
String forwardName = it.next();
PipeForward forward = pipeForwards.get(forwardName);
if (forward != null) {
String path = forward.getPath();
if (path != null) {
PipeLineExit plExit = pipeline.getPipeLineExits().get(path);
if (plExit == null) {
if (pipeline.getPipe(path) == null) {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix(null) + "has a forward of which the pipe to execute [" + path + "] is not defined.";
configWarnings.add(log, msg);
}
}
}
}
}
}
if (getLocker() != null) {
getLocker().configure();
}
eventHandler = MonitorManager.getEventHandler();
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class CommandSender method configure.
public void configure() throws ConfigurationException {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix() + "The class [" + getClass().getName() + "] has been deprecated. Please change to [" + getClass().getSuperclass().getName() + "]";
configWarnings.add(log, msg);
super.configure();
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class LogSender method configure.
public void configure() throws ConfigurationException {
super.configure();
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix() + "The class [" + getClass().getName() + "] has been deprecated. Please change to [" + getClass().getSuperclass().getName() + "]";
configWarnings.add(log, msg);
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class FixedResultSender method configure.
public void configure() throws ConfigurationException {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = getLogPrefix() + "The class [" + getClass().getName() + "] has been deprecated. Please change to [" + getClass().getSuperclass().getName() + "]";
configWarnings.add(log, msg);
super.configure();
}
Aggregations