Package org.geoserver.cluster.events

Examples of org.geoserver.cluster.events.ToggleEvent


        }

        if (event instanceof ToggleEvent) {

            // enable/disable the producer
            final ToggleEvent tEv = (ToggleEvent) event;
            if (tEv.getType().equals(this.type)) {
                setStatus(tEv.toggleTo());
            }

        } else {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.fine("Incoming application event of type "
View Full Code Here


            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                final boolean switchTo = !Boolean.parseBoolean(toggleInfo.getModel().getObject());
                final ApplicationContext ctx = getGeoServerApplication().getApplicationContext();
                ctx.publishEvent(new ToggleEvent(switchTo, type));
                // getConfig().putConfiguration(configKey,
                // Boolean.toString(switchTo));
                if (switchTo) {
                    fp.info("The " + type + " toggle is now ENABLED");
                } else {
View Full Code Here

    config.putConfiguration(ConfigDirConfiguration.CONFIGDIR_KEY, path);
  }

  public void toggle(final boolean switchTo, final ToggleType type) {

    ctx.publishEvent(new ToggleEvent(switchTo, type));

    final String switchToValue = Boolean.valueOf(switchTo).toString();
    if (type.equals(ToggleType.MASTER))
      config.putConfiguration(ToggleConfiguration.TOGGLE_MASTER_KEY,
          switchToValue);
View Full Code Here

TOP

Related Classes of org.geoserver.cluster.events.ToggleEvent

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.