Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2015-02-27 00:18:45 +0000
committerGreg Wilkins2015-02-27 00:18:45 +0000
commit8ec5cab56837a7baa0345400cd244697fb9a3494 (patch)
tree764298c1435d975d6ec4b5cdf1da99a8de79d96e /jetty-io
parent165ae8f238d1d55271ec5c375a2d6b66fb7e65ea (diff)
downloadorg.eclipse.jetty.project-8ec5cab56837a7baa0345400cd244697fb9a3494.tar.gz
org.eclipse.jetty.project-8ec5cab56837a7baa0345400cd244697fb9a3494.tar.xz
org.eclipse.jetty.project-8ec5cab56837a7baa0345400cd244697fb9a3494.zip
fixed LocalClient issue with integration tests
Diffstat (limited to 'jetty-io')
-rw-r--r--jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java
index 402c49545d..e5e0b41a1c 100644
--- a/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java
+++ b/jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java
@@ -180,6 +180,29 @@ public class ByteArrayEndPoint extends AbstractEndPoint
_runFillable.run();
}
+ public void addInputAndExecute(ByteBuffer in)
+ {
+ boolean fillable=false;
+ try(SpinLock.Lock lock = _lock.lock())
+ {
+ if (_inQ.peek()==EOF)
+ throw new RuntimeIOException(new EOFException());
+ boolean was_empty=_inQ.isEmpty();
+ if (in==null)
+ {
+ _inQ.add(EOF);
+ fillable=true;
+ }
+ if (BufferUtil.hasContent(in))
+ {
+ _inQ.add(in);
+ fillable=was_empty;
+ }
+ }
+ if (fillable)
+ execute(_runFillable);
+ }
+
/* ------------------------------------------------------------ */
public void addInput(String s)
{

Back to the top