Class AbortableInputStreamSubscriber
- java.lang.Object
 - 
- java.io.InputStream
 - 
- software.amazon.awssdk.http.async.AbortableInputStreamSubscriber
 
 
 
- 
- All Implemented Interfaces:
 Closeable,AutoCloseable,org.reactivestreams.Subscriber<ByteBuffer>,Abortable
public final class AbortableInputStreamSubscriber extends InputStream implements org.reactivestreams.Subscriber<ByteBuffer>, Abortable
Wrapper ofInputStreamSubscriberthat also implementsAbortable. It will invokeclose()whenabort()is invoked. Upon closing, the underlyingInputStreamSubscriberwill be closed, and additional action can be added viaAbortableInputStreamSubscriber.Builder.doAfterClose(Runnable). 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbortableInputStreamSubscriber.Builder 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts the execution of the task.static AbortableInputStreamSubscriber.Builderbuilder()voidclose()voidonComplete()voidonError(Throwable t)voidonNext(ByteBuffer byteBuffer)voidonSubscribe(org.reactivestreams.Subscription s)intread()intread(byte[] b)intread(byte[] b, int off, int len)- 
Methods inherited from class java.io.InputStream
available, mark, markSupported, reset, skip 
 - 
 
 - 
 
- 
- 
Method Detail
- 
builder
public static AbortableInputStreamSubscriber.Builder builder()
 
- 
abort
public void abort()
Description copied from interface:AbortableAborts the execution of the task. Multiple calls to abort or calling abort an already aborted task should return without error. 
- 
read
public int read() throws IOException- Specified by:
 readin classInputStream- Throws:
 IOException
 
- 
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
 readin classInputStream- Throws:
 IOException
 
- 
read
public int read(byte[] b) throws IOException- Overrides:
 readin classInputStream- Throws:
 IOException
 
- 
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s)
- Specified by:
 onSubscribein interfaceorg.reactivestreams.Subscriber<ByteBuffer>
 
- 
onNext
public void onNext(ByteBuffer byteBuffer)
- Specified by:
 onNextin interfaceorg.reactivestreams.Subscriber<ByteBuffer>
 
- 
onError
public void onError(Throwable t)
- Specified by:
 onErrorin interfaceorg.reactivestreams.Subscriber<ByteBuffer>
 
- 
onComplete
public void onComplete()
- Specified by:
 onCompletein interfaceorg.reactivestreams.Subscriber<ByteBuffer>
 
- 
close
public void close()
- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceCloseable- Overrides:
 closein classInputStream
 
 - 
 
 -