Package org.forgerock.openam.blacklist
Class ConfigurableSessionBlacklist
- java.lang.Object
-
- org.forgerock.openam.blacklist.ConfigurableSessionBlacklist
-
public class ConfigurableSessionBlacklist extends Object implements Blacklist<Session>
Blacklist which determines the appropriate strategy to use for blacklisting based on current configuration. Strategies may include caching types, or disabling blacklisting entirely. Will be updated automatically when the session service configuration changes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.forgerock.openam.blacklist.Blacklist
Blacklist.Listener
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidblacklist(Session entry)Blacklists the given entry until its expiry time.static ConfigurableSessionBlacklistcreateConfigurableSessionBlacklist(CTSBlacklist<Session> ctsBlacklist, SessionServiceConfig sessionServiceConfig)Create a configurable session blacklist based on the session service config.booleanisBlacklisted(Session entry)Determines whether the entry has previously been blacklisted.voidsubscribe(Blacklist.Listener listener)Subscribe for notifications when entries are blacklisted.
-
-
-
Method Detail
-
createConfigurableSessionBlacklist
public static ConfigurableSessionBlacklist createConfigurableSessionBlacklist(CTSBlacklist<Session> ctsBlacklist, SessionServiceConfig sessionServiceConfig)
Create a configurable session blacklist based on the session service config.- Parameters:
ctsBlacklist- The underlying CTS blacklist.sessionServiceConfig- The configuration of the session service.- Returns:
- The created ConfigurableSessionBlacklist.
-
blacklist
public void blacklist(Session entry) throws BlacklistException
Description copied from interface:BlacklistBlacklists the given entry until its expiry time.- Specified by:
blacklistin interfaceBlacklist<Session>- Parameters:
entry- The blacklist entry.- Throws:
BlacklistException- if the entry cannot be blacklisted for any reason.
-
isBlacklisted
public boolean isBlacklisted(Session entry) throws BlacklistException
Description copied from interface:BlacklistDetermines whether the entry has previously been blacklisted. Note: entries are only blacklisted until they expire, so afalseresult does not mean the entry is valid. Further checks should be made to establish entry validity.- Specified by:
isBlacklistedin interfaceBlacklist<Session>- Parameters:
entry- The entry to check for blacklisting.- Returns:
trueif the entry is currently blacklisted, orfalseif the entry is not blacklisted or has expired (and therefore been removed from the blacklist).- Throws:
BlacklistException- if an error occurs when checking the blacklist.
-
subscribe
public void subscribe(Blacklist.Listener listener)
Description copied from interface:BlacklistSubscribe for notifications when entries are blacklisted. Depending on the implementation, this may include only entries blacklisted in the local machine, or also notifications for entries blacklisted on other nodes in the cluster.
-
-