Class CamelPublisher
- java.lang.Object
-
- org.apache.camel.component.reactive.streams.engine.CamelPublisher
-
- All Implemented Interfaces:
AutoCloseable,org.reactivestreams.Publisher<org.apache.camel.Exchange>
public class CamelPublisher extends Object implements org.reactivestreams.Publisher<org.apache.camel.Exchange>, AutoCloseable
The Camel publisher. It forwards Camel exchanges to external reactive-streams subscribers.
-
-
Constructor Summary
Constructors Constructor Description CamelPublisher(ExecutorService workerPool, org.apache.camel.CamelContext context, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachProducer(ReactiveStreamsProducer producer)voidclose()voiddetachProducer()List<CamelSubscription>getSubscriptions()voidpublish(org.apache.camel.Exchange data)voidsubscribe(org.reactivestreams.Subscriber<? super org.apache.camel.Exchange> subscriber)voidunsubscribe(CamelSubscription subscription)
-
-
-
Constructor Detail
-
CamelPublisher
public CamelPublisher(ExecutorService workerPool, org.apache.camel.CamelContext context, String name)
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super org.apache.camel.Exchange> subscriber)
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<org.apache.camel.Exchange>
-
unsubscribe
public void unsubscribe(CamelSubscription subscription)
-
publish
public void publish(org.apache.camel.Exchange data)
-
attachProducer
public void attachProducer(ReactiveStreamsProducer producer)
-
detachProducer
public void detachProducer()
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getSubscriptions
public List<CamelSubscription> getSubscriptions()
-
-