Class HttpClientReadableByteChannel
- java.lang.Object
-
- io.fabric8.kubernetes.client.http.HttpClientReadableByteChannel
-
- All Implemented Interfaces:
AsyncBody.Consumer<List<ByteBuffer>>,Closeable,AutoCloseable,Channel,ReadableByteChannel
public class HttpClientReadableByteChannel extends Object implements ReadableByteChannel, AsyncBody.Consumer<List<ByteBuffer>>
Creates a blockingReadableByteChannelfrom aHttpResponsecontaining anAsyncBodyMay be useful eventually to provide a non-blocking channel as well.
-
-
Constructor Summary
Constructors Constructor Description HttpClientReadableByteChannel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidconsume(List<ByteBuffer> value, AsyncBody asyncBody)booleanisOpen()protected voidonResponse(HttpResponse<AsyncBody> response)intread(ByteBuffer arg0)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.fabric8.kubernetes.client.http.AsyncBody.Consumer
unwrap
-
-
-
-
Method Detail
-
consume
public void consume(List<ByteBuffer> value, AsyncBody asyncBody) throws Exception
- Specified by:
consumein interfaceAsyncBody.Consumer<List<ByteBuffer>>- Throws:
Exception
-
onResponse
protected void onResponse(HttpResponse<AsyncBody> response)
-
close
public void close()
-
read
public int read(ByteBuffer arg0) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
-