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 blockingReadableByteChannel
from aHttpResponse
containing anAsyncBody
May 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 void
close()
void
consume(List<ByteBuffer> value, AsyncBody asyncBody)
boolean
isOpen()
protected void
onResponse(HttpResponse<AsyncBody> response)
int
read(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:
consume
in 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:
read
in interfaceReadableByteChannel
- Throws:
IOException
-
-