View Javadoc

1   // ========================================================================
2   // Copyright (c) Webtide LLC
3   // ------------------------------------------------------------------------
4   // All rights reserved. This program and the accompanying materials
5   // are made available under the terms of the Eclipse Public License v1.0
6   // and Apache License v2.0 which accompanies this distribution.
7   //
8   // The Eclipse Public License is available at 
9   // http://www.eclipse.org/legal/epl-v10.html
10  //
11  // The Apache License v2.0 is available at
12  // http://www.apache.org/licenses/LICENSE-2.0.txt
13  //
14  // You may elect to redistribute this code under either of these licenses. 
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.util.log.Log;
22  import org.eclipse.jetty.util.log.Logger;
23  
24  public class DebugBinding implements AppLifeCycle.Binding
25  {
26      private static final Logger LOG = Log.getLogger(DebugBinding.class);
27  
28      final String[] _targets;
29      
30      public DebugBinding(String target)
31      {
32          _targets=new String[]{target};
33      }
34      
35      public DebugBinding(final String... targets)
36      {
37          _targets=targets;
38      }
39      
40      public String[] getBindingTargets()
41      {
42          return _targets;
43      }
44  
45      public void processBinding(Node node, App app) throws Exception
46      {
47          LOG.info("processBinding {} {}",node,app.getContextHandler());
48      }
49  }