@Override public void onFailure() { if (delegate != null) { delegate.onFailure(); } } });
@Override public void dispatchAsync(Command message) { if (!stopping.get()) { if (taskRunner == null) { dispatchSync(message); } else { synchronized (dispatchQueue) { dispatchQueue.add(message); } try { taskRunner.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { if (message.isMessageDispatch()) { MessageDispatch md = (MessageDispatch) message; TransmitCallback sub = md.getTransmitCallback(); broker.postProcessDispatch(md); if (sub != null) { sub.onFailure(); } } } }
broker.postProcessDispatch(messageDispatch); if (sub != null) { sub.onFailure();
broker.postProcessDispatch(md); if (sub != null) { sub.onFailure();
@Override public void onFailure() { if (delegate != null) { delegate.onFailure(); } } });
@Override public void onFailure() { if (delegate != null) { delegate.onFailure(); } } });
@Override public void onFailure() { if (delegate != null) { delegate.onFailure(); } } });
@Override public void dispatchAsync(Command message) { if (!stopping.get()) { if (taskRunner == null) { dispatchSync(message); } else { synchronized (dispatchQueue) { dispatchQueue.add(message); } try { taskRunner.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { if (message.isMessageDispatch()) { MessageDispatch md = (MessageDispatch) message; TransmitCallback sub = md.getTransmitCallback(); broker.postProcessDispatch(md); if (sub != null) { sub.onFailure(); } } } }
@Override public void dispatchAsync(Command message) { if (!stopping.get()) { if (taskRunner == null) { dispatchSync(message); } else { synchronized (dispatchQueue) { dispatchQueue.add(message); } try { taskRunner.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { if (message.isMessageDispatch()) { MessageDispatch md = (MessageDispatch) message; TransmitCallback sub = md.getTransmitCallback(); broker.postProcessDispatch(md); if (sub != null) { sub.onFailure(); } } } }
@Override public void dispatchAsync(Command message) { if (!stopping.get()) { if (taskRunner == null) { dispatchSync(message); } else { synchronized (dispatchQueue) { dispatchQueue.add(message); } try { taskRunner.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { if (message.isMessageDispatch()) { MessageDispatch md = (MessageDispatch) message; TransmitCallback sub = md.getTransmitCallback(); broker.postProcessDispatch(md); if (sub != null) { sub.onFailure(); } } } }
broker.postProcessDispatch(messageDispatch); if (sub != null) { sub.onFailure();
broker.postProcessDispatch(messageDispatch); if (sub != null) { sub.onFailure();
broker.postProcessDispatch(messageDispatch); if (sub != null) { sub.onFailure();
broker.postProcessDispatch(md); if (sub != null) { sub.onFailure();
broker.postProcessDispatch(md); if (sub != null) { sub.onFailure();
broker.postProcessDispatch(md); if (sub != null) { sub.onFailure();
protected void processDispatch(Command command) throws IOException { MessageDispatch messageDispatch = (MessageDispatch) (command.isMessageDispatch() ? command : null); try { if (!stopping.get()) { if (messageDispatch != null) { protocolManager.preProcessDispatch(messageDispatch); } dispatch(command); } } catch (IOException e) { if (messageDispatch != null) { TransmitCallback sub = messageDispatch.getTransmitCallback(); protocolManager.postProcessDispatch(messageDispatch); if (sub != null) { sub.onFailure(); } messageDispatch = null; throw e; } } finally { if (messageDispatch != null) { TransmitCallback sub = messageDispatch.getTransmitCallback(); protocolManager.postProcessDispatch(messageDispatch); if (sub != null) { sub.onSuccess(); } } } }