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 void
attachProducer(ReactiveStreamsProducer producer)
void
close()
void
detachProducer()
List<CamelSubscription>
getSubscriptions()
void
publish(org.apache.camel.Exchange data)
void
subscribe(org.reactivestreams.Subscriber<? super org.apache.camel.Exchange> subscriber)
void
unsubscribe(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:
subscribe
in 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:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getSubscriptions
public List<CamelSubscription> getSubscriptions()
-
-