diff options
author | Greg Wilkins | 2015-02-27 00:18:45 +0000 |
---|---|---|
committer | Greg Wilkins | 2015-02-27 00:18:45 +0000 |
commit | 8ec5cab56837a7baa0345400cd244697fb9a3494 (patch) | |
tree | 764298c1435d975d6ec4b5cdf1da99a8de79d96e /jetty-io | |
parent | 165ae8f238d1d55271ec5c375a2d6b66fb7e65ea (diff) | |
download | org.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.java | 23 |
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) { |