com.atlassian.crowd.util
Class InetAddressCacheUtil
java.lang.Object
com.atlassian.crowd.util.InetAddressCacheUtil
public class InetAddressCacheUtil
- extends Object
Utility class to store in a cache whether the InetAddress is permitted or forbidden to make a request to the Crowd server.
Method Summary |
void |
clearCache()
Clears the entire cache storing the address permissions. |
boolean |
getPermitted(Application application,
InetAddress address)
Gets from cache whether the application with address is permitted to make a request
to the Crowd server. |
void |
setPermitted(Application application,
InetAddress address,
boolean permitted)
Sets in the cache that address is permitted/forbidden from making a request to the Crowd server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INET_ADDRESS_CACHE_NAME
public static final String INET_ADDRESS_CACHE_NAME
InetAddressCacheUtil
public InetAddressCacheUtil(CacheManager cacheManager)
setPermitted
public void setPermitted(Application application,
InetAddress address,
boolean permitted)
- Sets in the cache that
address
is permitted/forbidden from making a request to the Crowd server.
- Parameters:
application
- application that is requesting the connection.address
- InetAddress to setpermitted
- whether address
is permitted or forbidden to make a request.
getPermitted
public boolean getPermitted(Application application,
InetAddress address)
throws NotInCacheException
- Gets from cache whether the
application
with address
is permitted to make a request
to the Crowd server.
- Parameters:
application
- Application making the request.address
- address of the client making the request.
- Returns:
- true if
application
with address
is permitted to make a request
- Throws:
NotInCacheException
- if the address is not in the cache
clearCache
public void clearCache()
- Clears the entire cache storing the address permissions.
Copyright © 2013 Atlassian. All Rights Reserved.