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

org.wildfly.clustering.web.undertow.IdentifierFactoryAdapter 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;

import io.undertow.server.session.SessionIdGenerator;

import java.util.function.Supplier;

/**
 * Adapts a {@link SessionIdGenerator} to a {@link IdentifierFactory}.
 * @author Paul Ferraro
 */
public class IdentifierFactoryAdapter implements Supplier {

    private final SessionIdGenerator generator;

    public IdentifierFactoryAdapter(SessionIdGenerator generator) {
        this.generator = generator;
    }

    @Override
    public String get() {
        return this.generator.createSessionId();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy