org.exoplatform.ws.security.oauth.impl
Class OAuthTokenCleanerImpl

java.lang.Object
  extended by java.lang.Thread
      extended by org.exoplatform.ws.security.oauth.impl.OAuthTokenCleanerImpl
All Implemented Interfaces:
java.lang.Runnable, OAuthTokenCleaner

public final class OAuthTokenCleanerImpl
extends java.lang.Thread
implements OAuthTokenCleaner

Version:
$Id: $
Author:
Andrey Parfonov

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static long DEFAULT_TIMEOUT
          Default cleaner timeout.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
OAuthTokenCleanerImpl(org.exoplatform.container.xml.InitParams params)
          Constructs OauthTokenCleaner.
 
Method Summary
 void clean()
          Looking for expired tokens and remove it.
 void run()
          
 void setTokens(java.util.Set<net.oauth.OAuthAccessor> tokens)
          By this method must be passed collections of accessor which must be under control.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
Default cleaner timeout. By default 5 minutes.

See Also:
Constant Field Values
Constructor Detail

OAuthTokenCleanerImpl

public OAuthTokenCleanerImpl(org.exoplatform.container.xml.InitParams params)
Constructs OauthTokenCleaner.

Parameters:
params - initialized parameters.
Method Detail

run

public void run()

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

clean

public void clean()
Looking for expired tokens and remove it.

Specified by:
clean in interface OAuthTokenCleaner

setTokens

public void setTokens(java.util.Set<net.oauth.OAuthAccessor> tokens)
By this method must be passed collections of accessor which must be under control.

Specified by:
setTokens in interface OAuthTokenCleaner
Parameters:
tokens - the Collection of tokens which must be under control.


Copyright © 2011 eXo Platform SAS. All Rights Reserved.