Package org.jboss.errai.bus.server.service

Examples of org.jboss.errai.bus.server.service.ErraiServiceConfigurator


   * @param svc - the <tt>ErraiService</tt> that is to be associated to this factory of workers
   */
  public WorkerFactory(ErraiService svc) {
    this.svc = svc;

    ErraiServiceConfigurator cfg = svc.getConfiguration();

    if (cfg.hasProperty(CONFIG_ASYNC_DELIVERY_QUEUE_SIZE)) {
      deliveryQueueSize = Integer.parseInt(cfg.getProperty(CONFIG_ASYNC_DELIVERY_QUEUE_SIZE));
    }

    if (cfg.hasProperty(CONFIG_ASYNC_THREAD_POOL_SIZE)) {
      poolSize = Integer.parseInt(cfg.getProperty(CONFIG_ASYNC_THREAD_POOL_SIZE));
    }

    if (cfg.hasProperty(CONFIG_ASYNC_WORKER_TIMEOUT)) {
      workerTimeout = seconds(Integer.parseInt(cfg.getProperty(CONFIG_ASYNC_WORKER_TIMEOUT)));
    }

    this.messages = new ArrayBlockingQueue<Message>(deliveryQueueSize);

    log.debug("initializing async worker pools (poolSize: " + poolSize + "; workerTimeout: " + workerTimeout + ")");
View Full Code Here


        return ErraiServiceSingleton.getService();
      }

      final ServletContext context = config.getServletContext();

      final ErraiServiceConfigurator configurator = new ErraiServiceConfiguratorImpl();

      final String autoDiscoverServices
              = ServletInitAttribs.AUTO_DISCOVER_SERVICES.getInitOrContextValue(config, "false");

      if (autoDiscoverServices != null) {
View Full Code Here

     * @param svc - the <tt>ErraiService</tt> that is to be associated to this factory of workers
     */
    public WorkerFactory(ErraiService svc) {
        this.svc = svc;

        ErraiServiceConfigurator cfg = svc.getConfiguration();

        if (cfg.hasProperty(CONFIG_ASYNC_DELIVERY_QUEUE_SIZE)) {
            deliveryQueueSize = Integer.parseInt(cfg.getProperty(CONFIG_ASYNC_DELIVERY_QUEUE_SIZE));
        }

        if (cfg.hasProperty(CONFIG_ASYNC_THREAD_POOL_SIZE)) {
            poolSize = Integer.parseInt(cfg.getProperty(CONFIG_ASYNC_THREAD_POOL_SIZE));
        }

        if (cfg.hasProperty(CONFIG_ASYNC_WORKER_TIMEOUT)) {
            workerTimeout = seconds(Integer.parseInt(cfg.getProperty(CONFIG_ASYNC_WORKER_TIMEOUT)));
        }

        this.messages = new ArrayBlockingQueue<Message>(deliveryQueueSize);

        log.info("initializing async worker pools (poolSize: " + poolSize + "; workerTimeout: " + workerTimeout + ")");
View Full Code Here

*/
class BusConfiguration implements BootstrapExecution
{
  public void execute(BootstrapContext context)
  {
    ErraiServiceConfigurator service = context.getConfig();
    context.getBus().configure(service);
  }
View Full Code Here

  public void execute(BootstrapContext context)
  {
    String requireAuthenticationForAll = "errai.require_authentication_for_all";

    final ErraiServiceConfigurator config = context.getConfig();

    if (config.hasProperty(requireAuthenticationForAll) && "true".equals(config.getProperty(requireAuthenticationForAll))) {
      log.info("authentication for all requests required, adding rule ... ");
      context.getBus().addRule("AuthorizationService", new RolesRequiredRule(new HashSet<Object>(), context.getBus()));
    }
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.bus.server.service.ErraiServiceConfigurator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.