Class ReactiveStreamsCamelSubscriber
- java.lang.Object
-
- org.apache.camel.component.reactive.streams.ReactiveStreamsCamelSubscriber
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.reactivestreams.Subscriber<org.apache.camel.Exchange>
public class ReactiveStreamsCamelSubscriber extends Object implements org.reactivestreams.Subscriber<org.apache.camel.Exchange>, Closeable
The Camel subscriber. It bridges messages from reactive streams to Camel routes.
-
-
Constructor Summary
Constructors Constructor Description ReactiveStreamsCamelSubscriber(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachConsumer(ReactiveStreamsConsumer consumer)voidclose()voiddetachConsumer()ReactiveStreamsConsumergetConsumer()longgetInflightCount()longgetRequested()voidonComplete()voidonError(Throwable throwable)voidonNext(org.apache.camel.Exchange exchange)voidonSubscribe(org.reactivestreams.Subscription subscription)protected voidrefill()
-
-
-
Constructor Detail
-
ReactiveStreamsCamelSubscriber
public ReactiveStreamsCamelSubscriber(String name)
-
-
Method Detail
-
attachConsumer
public void attachConsumer(ReactiveStreamsConsumer consumer)
-
getConsumer
public ReactiveStreamsConsumer getConsumer()
-
detachConsumer
public void detachConsumer()
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription subscription)
- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<org.apache.camel.Exchange>
-
onNext
public void onNext(org.apache.camel.Exchange exchange)
- Specified by:
onNextin interfaceorg.reactivestreams.Subscriber<org.apache.camel.Exchange>
-
refill
protected void refill()
-
onError
public void onError(Throwable throwable)
- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<org.apache.camel.Exchange>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<org.apache.camel.Exchange>
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getRequested
public long getRequested()
-
getInflightCount
public long getInflightCount()
-
-