/** * Initializes the errai service with a bus and configurator * * @param configurator - the configurator to take care of the configuration for the service */ @Inject public ErraiServiceImpl(final ErraiServiceConfigurator configurator) { this.bus = new ServerMessageBusImpl(this, configurator); this.config = configurator; boostrap(); }
@Override public void store(Collection<Message> messages) { for (Message m : messages) { store(m); } }
/** * Passes off the message to the bus for handling * * @param message - the message to store/deliver */ @Override public void store(Message message) { if (message == null) { return; } message.addResources(config.getResourceProviders()); /* * Pass the message off to the messaging bus for handling. */ try { getDispatcher().dispatchGlobal(message); } catch (QueueUnavailableException e) { throw e; } catch (Throwable t) { t.printStackTrace(); if (!message.hasResource("Exception")) { message.setResource("Exception", t.getCause()); ErrorHelper.sendClientError(bus, message, t.getMessage(), t); } } }
/** * Passes off the message to the bus for handling * * @param message - the message to store/deliver */ @Override public void store(Message message) { if (message == null) { return; } message.addResources(config.getResourceProviders()); /* * Pass the message off to the messaging bus for handling. */ try { getDispatcher().dispatchGlobal(message); } catch (QueueUnavailableException e) { throw e; } catch (Throwable t) { t.printStackTrace(); if (!message.hasResource("Exception")) { message.setResource("Exception", t.getCause()); ErrorHelper.sendClientError(bus, message, t.getMessage(), t); } } }
@Override public void store(Collection<Message> messages) { for (Message m : messages) { store(m); } }
/** * Initializes the errai service with a bus and configurator * * @param configurator - the configurator to take care of the configuration for the service */ @Inject public ErraiServiceImpl(final ErraiServiceConfigurator configurator) { this.bus = new ServerMessageBusImpl(this, configurator); this.config = configurator; boostrap(); }