public ProtocolStack(Executor executor, DispatchFailureHandler<? super T> outgoingDispatchFailureHandler, DispatchFailureHandler<? super T> incomingDispatchFailureHandler,
Protocol<T>... protocols) {
this.outgoingDispatchFailureHandler = outgoingDispatchFailureHandler;
this.incomingDispatchFailureHandler = incomingDispatchFailureHandler;
this.callbackQueue = new DelayedReceive<Runnable>(new TrueTimeProvider());
protocolsStopped = new CountDownLatch(protocols.length);
//Start work queue
workQueue = new AsyncDispatch<Runnable>(executor);
workQueue.dispatchTo(new ExecuteRunnable());