if (newState.isShadowDeliverable()) { sendDeferredToShadow();
if (!getState().isStartableState()) { logger.warn("aborting startup. bus is not in correct state. (current state: " + getState() + ")"); return;
public static Subscription subscribe(final String eventType, final AbstractCDIEventCallback<?> callback) { if (isRemoteCommunicationEnabled() && ErraiBus.get() instanceof ClientMessageBusImpl && ((ClientMessageBusImpl) ErraiBus.get()).getState().equals(BusState.CONNECTED)) { MessageBuilder.createMessage() .toSubject(CDI.SERVER_DISPATCHER_SUBJECT) .command(CDICommands.RemoteSubscribe) .with(CDIProtocol.BeanType, eventType) .with(CDIProtocol.Qualifiers, callback.getQualifiers()) .noErrorHandling().sendNowWith(ErraiBus.get()); } return subscribeLocal(eventType, callback, false); }
public static Subscription subscribe(final String eventType, final AbstractCDIEventCallback<?> callback) { if (isRemoteCommunicationEnabled() && ErraiBus.get() instanceof ClientMessageBusImpl && ((ClientMessageBusImpl) ErraiBus.get()).getState().equals(BusState.CONNECTED)) { MessageBuilder.createMessage() .toSubject(CDI.SERVER_DISPATCHER_SUBJECT) .command(CDICommands.RemoteSubscribe) .with(CDIProtocol.BeanType, eventType) .with(CDIProtocol.Qualifiers, callback.getQualifiers()) .noErrorHandling().sendNowWith(ErraiBus.get()); } return subscribeLocal(eventType, callback, false); }
if (getState().isShadowDeliverable() && shadowSubscriptions.containsKey(subject)) { deliverToSubscriptions(shadowSubscriptions, subject, message); delivered = true;
if (!getState().isStartableState()) { logger.warn("aborting startup. bus is not in correct state. (current state: " + getState() + ")"); return;
if (newState.isShadowDeliverable()) { sendDeferredToShadow();
if (getState().isShadowDeliverable() && shadowSubscriptions.containsKey(subject)) { deliverToSubscriptions(shadowSubscriptions, subject, message); delivered = true;