1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.eclipse.jetty.deploy.bindings;
17
18 import org.eclipse.jetty.deploy.App;
19 import org.eclipse.jetty.deploy.AppLifeCycle;
20 import org.eclipse.jetty.deploy.graph.Node;
21 import org.eclipse.jetty.server.handler.ContextHandler;
22
23 public class StandardDeployer implements AppLifeCycle.Binding
24 {
25 public String[] getBindingTargets()
26 {
27 return new String[]
28 { "deploying" };
29 }
30
31 public void processBinding(Node node, App app) throws Exception
32 {
33 ContextHandler handler = app.getContextHandler();
34 if (handler == null)
35 {
36 throw new NullPointerException("No Handler created for App: " + app);
37 }
38 app.getDeploymentManager().getContexts().addHandler(handler);
39 }
40 }