All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.clustering.web.undertow.session.UndertowSessionAttributeImmutability Maven / Gradle / Ivy

Go to download

This module adapts an implementation of wildfly-clustering-web-spi to the Undertow servlet container.

There is a newer version: 34.0.0.Final
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.wildfly.clustering.web.undertow.session;

import java.util.Arrays;

import org.wildfly.clustering.ee.Immutability;
import org.wildfly.clustering.ee.immutable.SimpleImmutability;
import org.wildfly.elytron.web.undertow.server.servlet.ServletSecurityContextImpl.IdentityContainer;
import org.wildfly.security.cache.CachedIdentity;

import io.undertow.security.api.AuthenticatedSessionManager.AuthenticatedSession;
import io.undertow.servlet.util.SavedRequest;

/**
 * @author Paul Ferraro
 */
public enum UndertowSessionAttributeImmutability implements Immutability {
    CLASSES(new SimpleImmutability(Arrays.asList(AuthenticatedSession.class, SavedRequest.class, CachedIdentity.class, IdentityContainer.class))),
    ;
    private final Immutability immutability;

    UndertowSessionAttributeImmutability(Immutability immutability) {
        this.immutability = immutability;
    }

    @Override
    public boolean test(Object object) {
        return this.immutability.test(object);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy