org.wildfly.clustering.session.cache.DelegatingSessionManagerConfiguration Maven / Gradle / Ivy
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/
package org.wildfly.clustering.session.cache;
import java.time.Duration;
import java.util.function.Consumer;
import java.util.function.Supplier;
import org.wildfly.clustering.session.ImmutableSession;
import org.wildfly.clustering.session.SessionManagerConfiguration;
/**
* A {@link SessionManagerConfiguration} implementation that delegates to another {@link SessionManagerConfiguration}.
* @author Paul Ferraro
* @param the servlet context type
*/
public class DelegatingSessionManagerConfiguration implements SessionManagerConfiguration {
private final SessionManagerConfiguration configuration;
public DelegatingSessionManagerConfiguration(SessionManagerConfiguration configuration) {
this.configuration = configuration;
}
@Override
public Consumer getExpirationListener() {
return this.configuration.getExpirationListener();
}
@Override
public Duration getTimeout() {
return this.configuration.getTimeout();
}
@Override
public C getContext() {
return this.configuration.getContext();
}
@Override
public Supplier getIdentifierFactory() {
return this.configuration.getIdentifierFactory();
}
}