|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.rahas.SimpleTokenStore
public class SimpleTokenStore
In-memory implementation of the token storage
| Field Summary | |
|---|---|
protected java.util.concurrent.locks.Lock |
readLock
|
protected java.util.concurrent.locks.ReadWriteLock |
readWriteLock
We use a read write lock to improve concurrency while avoiding concurrent modification exceptions. |
protected java.util.Map |
tokens
|
protected java.util.concurrent.locks.Lock |
writeLock
|
| Fields inherited from interface org.apache.rahas.TokenStorage |
|---|
TOKEN_STORAGE_KEY |
| Constructor Summary | |
|---|---|
SimpleTokenStore()
|
|
| Method Summary | |
|---|---|
void |
add(Token token)
Add the given token to the list. |
Token[] |
getCancelledTokens()
Return the list of CANCELLED tokens |
Token[] |
getExpiredTokens()
Return the list of EXPIRED tokens. |
static java.lang.String |
getIdFromSTR(org.apache.axiom.om.OMElement str)
|
Token[] |
getRenewedTokens()
Return the list of RENEWED tokens. |
Token |
getToken(java.lang.String id)
Returns the Token of the given id |
java.lang.String[] |
getTokenIdentifiers()
Return the list of all token identifiers. |
Token[] |
getValidTokens()
Return the list of ISSUED and RENEWED tokens. |
protected void |
processTokenExpiry()
|
void |
update(Token token)
Update an existing token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map tokens
protected final java.util.concurrent.locks.ReadWriteLock readWriteLock
protected final java.util.concurrent.locks.Lock readLock
protected final java.util.concurrent.locks.Lock writeLock
| Constructor Detail |
|---|
public SimpleTokenStore()
| Method Detail |
|---|
public void add(Token token)
throws TrustException
TokenStorage
add in interface TokenStoragetoken - The token to be added
TrustException
public void update(Token token)
throws TrustException
TokenStorage
update in interface TokenStorageTrustException
public java.lang.String[] getTokenIdentifiers()
throws TrustException
TokenStorage
getTokenIdentifiers in interface TokenStorageTrustException
public Token[] getValidTokens()
throws TrustException
TokenStorage
getValidTokens in interface TokenStorageTokens.
TrustException
public Token[] getRenewedTokens()
throws TrustException
TokenStorage
getRenewedTokens in interface TokenStorageTokens
TrustException
public Token[] getCancelledTokens()
throws TrustException
TokenStorage
getCancelledTokens in interface TokenStorageTokens
TrustException
public Token[] getExpiredTokens()
throws TrustException
TokenStorageEXPIRED tokens.
If there are no EXPIRED tokens null will be
returned
getExpiredTokens in interface TokenStorageTokens
TrustException
public Token getToken(java.lang.String id)
throws TrustException
TokenStorageToken of the given id
getToken in interface TokenStorageToken identified by the give id
TrustException
protected void processTokenExpiry()
throws TrustException
TrustExceptionpublic static java.lang.String getIdFromSTR(org.apache.axiom.om.OMElement str)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||