com.atlassian.crowd.util
Class RemoteAddressCacheUtil
java.lang.Object
com.atlassian.crowd.util.RemoteAddressCacheUtil
public class RemoteAddressCacheUtil
- extends java.lang.Object
Utility class to store in a cache whether the RemoteAddress is permitted or forbidden to make a request to the Crowd server.
|
Method Summary |
void |
clearCache()
Clears the entire cache storing the remote addresses permissions. |
boolean |
getPermitted(Application application,
RemoteAddress remoteAddress)
Gets from cache whether the application with remoteAddress is permitted to make a request
to the Crowd server. |
void |
setPermitted(Application application,
RemoteAddress remoteAddress,
boolean permitted)
Sets in the cache that remoteAddress 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 |
REMOTE_ADDRESS_CACHE_NAME
public static final java.lang.String REMOTE_ADDRESS_CACHE_NAME
RemoteAddressCacheUtil
public RemoteAddressCacheUtil(CacheManager cacheManager)
setPermitted
public void setPermitted(Application application,
RemoteAddress remoteAddress,
boolean permitted)
- Sets in the cache that
remoteAddress is permitted/forbidden from making a request to the Crowd server.
- Parameters:
application - application that is requesting the connection.remoteAddress - RemoteAddress to setpermitted - whether remoteAddress is permitted or forbidden to make a request.
getPermitted
public boolean getPermitted(Application application,
RemoteAddress remoteAddress)
throws NotInCacheException
- Gets from cache whether the
application with remoteAddress is permitted to make a request
to the Crowd server.
- Parameters:
application - Application making the request.remoteAddress - address of the client making the request.
- Returns:
- true if
application with remoteAddress 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 remote addresses permissions.
Copyright © 2011 Atlassian. All Rights Reserved.