Class ReactorDispatcher
- java.lang.Object
-
- com.microsoft.azure.servicebus.amqp.ReactorDispatcher
-
public final class ReactorDispatcher extends Object
Reactoris not thread-safe - all calls toProtonAPI's should be - on the Reactor Thread.Reactorworks out-of-box for all event driven API - ex: onReceive - which could raise upon onSocketRead.Reactordidn't support API's like Send() out-of-box - which could potentially run on different thread to that of Reactor. So, the following utility class is used to generate an Event to hook intoReactor's event delegation pattern. It uses aPipeas the IO on which Reactor Listens to. Cardinality: multipleReactorDispatcher's could be attached to 1Reactor. EachReactorDispatchershould be initialized Synchronously - as it calls API inReactorwhich is not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description ReactorDispatcher(org.apache.qpid.proton.reactor.Reactor reactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinvoke(int delay, DispatchHandler timerCallback)voidinvoke(DispatchHandler timerCallback)
-
-
-
Constructor Detail
-
ReactorDispatcher
public ReactorDispatcher(org.apache.qpid.proton.reactor.Reactor reactor) throws IOException- Throws:
IOException
-
-
Method Detail
-
invoke
public void invoke(DispatchHandler timerCallback) throws IOException
- Throws:
IOException
-
invoke
public void invoke(int delay, DispatchHandler timerCallback) throws IOException- Throws:
IOException
-
-