Search in sources :

Example 1 with ReverseProxyConfigChangedEvent

use of org.openntf.openliberty.domino.reverseproxy.event.ReverseProxyConfigChangedEvent in project openliberty-domino by OpenNTF.

the class ReverseProxyHttpService method notifyMessage.

@Override
public void notifyMessage(EventObject event) {
    if (event instanceof ReverseProxyConfigChangedEvent) {
        this.targets.values().forEach(ComponentModule::destroyModule);
        ReverseProxyConfig config = ((ReverseProxyConfigChangedEvent) event).getSource();
        this.enabled = config.isEnabled(this);
        this.targets = buildModules(config.getTargets());
    }
}
Also used : ReverseProxyConfig(org.openntf.openliberty.domino.reverseproxy.ReverseProxyConfig) ComponentModule(com.ibm.designer.runtime.domino.adapter.ComponentModule) ReverseProxyConfigChangedEvent(org.openntf.openliberty.domino.reverseproxy.event.ReverseProxyConfigChangedEvent)

Example 2 with ReverseProxyConfigChangedEvent

use of org.openntf.openliberty.domino.reverseproxy.event.ReverseProxyConfigChangedEvent in project openliberty-domino by OpenNTF.

the class StandaloneReverseProxyService method notifyMessage.

@Override
public void notifyMessage(EventObject event) {
    if (event instanceof ReverseProxyConfigChangedEvent) {
        ReverseProxyConfig config = ((ReverseProxyConfigChangedEvent) event).getSource();
        int newHash = config.hashCode();
        if (this.configHash != newHash) {
            this.config = config;
            this.configHash = newHash;
            refreshServer();
        }
    }
}
Also used : ReverseProxyConfig(org.openntf.openliberty.domino.reverseproxy.ReverseProxyConfig) ReverseProxyConfigChangedEvent(org.openntf.openliberty.domino.reverseproxy.event.ReverseProxyConfigChangedEvent)

Aggregations

ReverseProxyConfig (org.openntf.openliberty.domino.reverseproxy.ReverseProxyConfig)2 ReverseProxyConfigChangedEvent (org.openntf.openliberty.domino.reverseproxy.event.ReverseProxyConfigChangedEvent)2 ComponentModule (com.ibm.designer.runtime.domino.adapter.ComponentModule)1