Adding convenience methods

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1154 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Joakim Erdfelt 2009-12-16 21:46:02 +00:00
parent 7b5fbd8b4d
commit caf4735792
2 changed files with 16 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import org.eclipse.jetty.deploy.bindings.StandardDeployer;
import org.eclipse.jetty.deploy.bindings.StandardStarter;
import org.eclipse.jetty.deploy.bindings.StandardStopper;
import org.eclipse.jetty.deploy.bindings.StandardUndeployer;
import org.eclipse.jetty.deploy.graph.Edge;
import org.eclipse.jetty.deploy.graph.Node;
import org.eclipse.jetty.deploy.graph.Path;
import org.eclipse.jetty.server.Server;
@ -149,6 +150,21 @@ public class DeploymentManager extends AbstractLifeCycle
lifecycle.addBinding(binding);
}
/**
* Convenience method to allow for insertion of nodes into the lifecycle.
*
* @param existingFromNodeName
* @param existingToNodeName
* @param insertedNodeName
*/
public void insertLifeCycleNode(String existingFromNodeName, String existingToNodeName, String insertedNodeName)
{
Node fromNode = lifecycle.getNodeByName(existingFromNodeName);
Node toNode = lifecycle.getNodeByName(existingToNodeName);
Edge edge = new Edge(fromNode,toNode);
lifecycle.insertNode(edge,insertedNodeName);
}
@Override
protected void doStart() throws Exception
{

View File

@ -211,7 +211,6 @@ public class MonitoredDirAppProvider extends AbstractLifeCycle implements AppPro
this.scanner.setRecursive(recursive);
this.scanner.setFilenameFilter(filenamefilter);
this.scanner.addListener(this);
this.scanner.scan();
this.scanner.start();
Log.info("Started scanner: " + scanner);
}