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

com.daedafusion.security.authentication.SharedAuthenticationState Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
package com.daedafusion.security.authentication;

import org.apache.log4j.Logger;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by mphilpot on 7/16/14.
 */
public final class SharedAuthenticationState
{
    private static final Logger log = Logger.getLogger(SharedAuthenticationState.class);

    private final Map state;

    public SharedAuthenticationState()
    {
        state = new ConcurrentHashMap<>();
    }

    public void reset()
    {
        state.clear();
    }

    public void addState(String key, Object value)
    {
        state.put(key, value);
    }

    public Object getState(String key)
    {
        return state.get(key);
    }

    public boolean hasState(String key)
    {
        return state.containsKey(key);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy