Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse McConnell2011-05-20 16:54:25 -0400
committerJesse McConnell2011-05-20 16:54:25 -0400
commitef3feecb527478a0726c93386c60b449aea211f3 (patch)
tree87f644b730777e594cd4bdac112578b076e5f4b2
parentf7d6bcad50e0e8c994f3482e0199e81d3b04a656 (diff)
downloadorg.eclipse.jetty.project-ef3feecb527478a0726c93386c60b449aea211f3.tar.gz
org.eclipse.jetty.project-ef3feecb527478a0726c93386c60b449aea211f3.tar.xz
org.eclipse.jetty.project-ef3feecb527478a0726c93386c60b449aea211f3.zip
Bug 346764 added new binding that provides ordered execution of bindings
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3226 7e9141cc-0065-0410-87d8-b60c137991c4
-rw-r--r--VERSION.txt1
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/OrderedGroupBinding.java75
2 files changed, 76 insertions, 0 deletions
diff --git a/VERSION.txt b/VERSION.txt
index 14760c9d70..b2a4dcf011 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -11,6 +11,7 @@ jetty-7.4.2-SNAPSHOT
+ 346181 o.e.j.server.StressTest stalls on MacOS X platform
+ JETTY-1342 Recreate selector if wakeup throws JVM bug
+ 346614 HttpConnection.handle() spins in case of SSL truncation attacks
+ + 346764 OrderedGroupBinding deployment binding
jetty-7.4.1.v20110513
+ 288563 remove unsupported and deprecated --secure option
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/OrderedGroupBinding.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/OrderedGroupBinding.java
new file mode 100644
index 0000000000..f6b2ad6cb2
--- /dev/null
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/OrderedGroupBinding.java
@@ -0,0 +1,75 @@
+package org.eclipse.jetty.deploy.bindings;
+//========================================================================
+//Copyright (c) Webtide LLC
+//------------------------------------------------------------------------
+//All rights reserved. This program and the accompanying materials
+//are made available under the terms of the Eclipse Public License v1.0
+//and Apache License v2.0 which accompanies this distribution.
+//
+//The Eclipse Public License is available at
+//http://www.eclipse.org/legal/epl-v10.html
+//
+//The Apache License v2.0 is available at
+//http://www.apache.org/licenses/LICENSE-2.0.txt
+//
+//You may elect to redistribute this code under either of these licenses.
+//========================================================================
+
+import java.util.LinkedList;
+
+import org.eclipse.jetty.deploy.App;
+import org.eclipse.jetty.deploy.AppLifeCycle;
+import org.eclipse.jetty.deploy.graph.Node;
+
+/**
+ * Provides a way of forcing the ordered execution of bindings within
+ * a declared binding target.
+ *
+ */
+public class OrderedGroupBinding implements AppLifeCycle.Binding
+{
+ private String[] _bindingTargets;
+
+ private LinkedList<AppLifeCycle.Binding> _orderedBindings;
+
+ public OrderedGroupBinding( String[] bindingTargets )
+ {
+ _bindingTargets = bindingTargets;
+ }
+
+ public void addBinding(AppLifeCycle.Binding binding)
+ {
+ if ( _orderedBindings == null )
+ {
+ _orderedBindings = new LinkedList<AppLifeCycle.Binding>();
+ }
+
+ _orderedBindings.add(binding);
+ }
+
+ public void addBindings(AppLifeCycle.Binding[] bindings)
+ {
+ if ( _orderedBindings == null )
+ {
+ _orderedBindings = new LinkedList<AppLifeCycle.Binding>();
+ }
+
+ for (AppLifeCycle.Binding binding : bindings)
+ {
+ _orderedBindings.add(binding);
+ }
+ }
+
+ public String[] getBindingTargets()
+ {
+ return _bindingTargets;
+ }
+
+ public void processBinding(Node node, App app) throws Exception
+ {
+ for ( AppLifeCycle.Binding binding : _orderedBindings )
+ {
+ binding.processBinding(node,app);
+ }
+ }
+}

Back to the top