final ByteBufferInputStream entityStream = new ByteBufferInputStream(); final AtomicBoolean futureSet = new AtomicBoolean(false);
final Request connectorRequest = translate(request); final Map<String, String> clientHeadersSnapshot = writeOutBoundHeaders(request.getHeaders(), connectorRequest); final ByteBufferInputStream entityStream = new ByteBufferInputStream(); final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
private synchronized void commitToMode() { // return if the mode has already been committed if (mode != Mode.UNDECIDED) { return; } // go asynchronous, if the user has made any move suggesting asynchronous mode if (readListener != null || listenerExecutor != null) { mode = Mode.ASYNCHRONOUS; return; } // go synchronous, if the user has not made any move suggesting asynchronous mode mode = Mode.SYNCHRONOUS; synchronousStream = new ByteBufferInputStream(); // move all buffered data to synchronous stream for (ByteBuffer b : data) { if (b == EOF) { synchronousStream.closeQueue(); } else if (b == ERROR) { synchronousStream.closeQueue(t); } else { try { synchronousStream.put(b); } catch (InterruptedException e) { synchronousStream.closeQueue(e); } } } }
final ByteBufferInputStream entityStream = new ByteBufferInputStream(); jettyRequest.send(new Response.Listener.Adapter() {
final ByteBufferInputStream entityStream = new ByteBufferInputStream(); final AtomicBoolean futureSet = new AtomicBoolean(false);
final Request connectorRequest = translate(request); final Map<String, String> clientHeadersSnapshot = writeOutBoundHeaders(request.getHeaders(), connectorRequest); final ByteBufferInputStream entityStream = new ByteBufferInputStream(); final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
final ByteBufferInputStream entityStream = new ByteBufferInputStream(); jettyRequest.send(new Response.Listener.Adapter() {