org.gcube.common.scope.impl
Class DefaultScopeProvider

java.lang.Object
  extended by org.gcube.common.scope.impl.DefaultScopeProvider
All Implemented Interfaces:
ScopeProvider

public class DefaultScopeProvider
extends Object
implements ScopeProvider

A ScopeProvider that uses threads as contexts.

Relies an an internal InheritableThreadLocal.

Author:
Fabio Simeoni
See Also:
ScopeProviderScanner

Field Summary
static String SCOPE_PROPERTY
          System property for scope
 
Fields inherited from interface org.gcube.common.scope.api.ScopeProvider
instance
 
Constructor Summary
protected DefaultScopeProvider()
           
 
Method Summary
 String get()
          Returns the scope in the caller's context.
 void reset()
          Resets the scope in the caller's context.
 void set(String scope)
          Sets the scope in the caller's context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCOPE_PROPERTY

public static final String SCOPE_PROPERTY
System property for scope

See Also:
Constant Field Values
Constructor Detail

DefaultScopeProvider

protected DefaultScopeProvider()
Method Detail

get

public String get()
Description copied from interface: ScopeProvider
Returns the scope in the caller's context.

Specified by:
get in interface ScopeProvider
Returns:
the scope

set

public void set(String scope)
Description copied from interface: ScopeProvider
Sets the scope in the caller's context.

Specified by:
set in interface ScopeProvider
Parameters:
scope - the scope

reset

public void reset()
Description copied from interface: ScopeProvider
Resets the scope in the caller's context.

Specified by:
reset in interface ScopeProvider


Copyright © 2012. All Rights Reserved.