|
||||||||||
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 edu.emory.mathcs.backport.java.util.concurrent.locks.Lock |
readLock
|
protected edu.emory.mathcs.backport.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 edu.emory.mathcs.backport.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 edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock readWriteLock
protected final edu.emory.mathcs.backport.java.util.concurrent.locks.Lock readLock
protected final edu.emory.mathcs.backport.java.util.concurrent.locks.Lock writeLock
Constructor Detail |
---|
public SimpleTokenStore()
Method Detail |
---|
public void add(Token token) throws TrustException
TokenStorage
add
in interface TokenStorage
token
- The token to be added
TrustException
public void update(Token token) throws TrustException
TokenStorage
update
in interface TokenStorage
TrustException
public java.lang.String[] getTokenIdentifiers() throws TrustException
TokenStorage
getTokenIdentifiers
in interface TokenStorage
TrustException
public Token[] getValidTokens() throws TrustException
TokenStorage
getValidTokens
in interface TokenStorage
Tokens
.
TrustException
public Token[] getRenewedTokens() throws TrustException
TokenStorage
getRenewedTokens
in interface TokenStorage
Tokens
TrustException
public Token[] getCancelledTokens() throws TrustException
TokenStorage
getCancelledTokens
in interface TokenStorage
Tokens
TrustException
public Token[] getExpiredTokens() throws TrustException
TokenStorage
EXPIRED
tokens.
If there are no EXPIRED
tokens null
will be
returned
getExpiredTokens
in interface TokenStorage
Tokens
TrustException
public Token getToken(java.lang.String id) throws TrustException
TokenStorage
Token
of the given id
getToken
in interface TokenStorage
Token
identified by the give id
TrustException
protected void processTokenExpiry() throws TrustException
TrustException
public 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 |