Search in sources :

Example 1 with JsonSetter

use of com.fasterxml.jackson.annotation.JsonSetter in project OpenAM by OpenRock.

the class InternalSession method setRestrictedTokensBySid.

/**
     * This setter method is used by the JSON serialization mechanism and should not be used for other purposes.
     *
     * @param restrictedTokensBySid The deserialized map of sid<->restricted tokens that should be stored in a
     * ConcurrentHashMap.
     */
@JsonSetter
private void setRestrictedTokensBySid(ConcurrentMap<SessionID, TokenRestriction> restrictedTokensBySid) {
    for (Map.Entry<SessionID, TokenRestriction> entry : restrictedTokensBySid.entrySet()) {
        SessionID sid = entry.getKey();
        TokenRestriction restriction = entry.getValue();
        this.restrictedTokensBySid.put(sid, restriction);
        this.restrictedTokensByRestriction.put(restriction, sid);
    }
}
Also used : TokenRestriction(com.iplanet.dpro.session.TokenRestriction) HashMap(java.util.HashMap) ConcurrentMap(java.util.concurrent.ConcurrentMap) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) SessionID(com.iplanet.dpro.session.SessionID) JsonSetter(com.fasterxml.jackson.annotation.JsonSetter)

Aggregations

JsonSetter (com.fasterxml.jackson.annotation.JsonSetter)1 SessionID (com.iplanet.dpro.session.SessionID)1 TokenRestriction (com.iplanet.dpro.session.TokenRestriction)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ConcurrentMap (java.util.concurrent.ConcurrentMap)1