Examples of ErraiServiceConfigurator


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

* @author: Heiko Braun <hbraun@redhat.com>
* @date: May 3, 2010
*/
class BusConfiguration implements BootstrapExecution {
  public void execute(BootstrapContext context) {
    ErraiServiceConfigurator service = context.getConfig();
    context.getBus().configure(service);
  }
View Full Code Here

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

  private Logger log = LoggerFactory.getLogger(AuthenticationRules.class);

  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

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.info("initializing async worker pools (poolSize: " + poolSize + "; workerTimeout: " + workerTimeout + ")");
View Full Code Here

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

  private Logger log = LoggerFactory.getLogger(AuthenticationRules.class);

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

    final ErraiServiceConfigurator config = context.getConfig();

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

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

  private boolean longPollingEnabled;
  private int longPollTimeout;
  private int sseTimeout;

  private void configureSettings() {
    final ErraiServiceConfigurator config = service.getConfiguration();

    final boolean hostedModeTesting = ErraiConfigAttribs.HOSTED_MODE_TESTING.getBoolean(config);
    longPollingEnabled = !hostedModeTesting && ErraiConfigAttribs.DO_LONG_POLL.getBoolean(config);
    longPollTimeout = ErraiConfigAttribs.LONG_POLL_TIMEOUT.getInt(config);
    sseTimeout = ErraiConfigAttribs.SSE_TIMEOUT.getInt(config);
View Full Code Here

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.info("initializing async worker pools (poolSize: " + poolSize + "; workerTimeout: " + workerTimeout + ")");
View Full Code Here

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

  private Logger log = LoggerFactory.getLogger(AuthenticationRules.class);

  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

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

        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

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

  public WebSocketServer(ErraiService svc) {
    this.svc = svc;
  }

  public void start() {
    final ErraiServiceConfigurator esc = svc.getConfiguration();
    useSecureWebSocket = ErraiConfigAttribs.SECURE_WEB_SOCKET_SERVER.getBoolean(esc);
    final int port = ErraiConfigAttribs.WEB_SOCKET_PORT.getInt(esc);
    final ServerBootstrap bootstrap = new ServerBootstrap();
    final WebSocketServerHandler webSocketHandler = new WebSocketServerHandler(svc);
View Full Code Here

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

        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
TOP
Copyright © 2018 www.massapi.com. 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.