|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.scope.GCUBEScopeManagerImpl
public class GCUBEScopeManagerImpl
Default implementation of GCUBEScopeManager.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.gcube.common.core.scope.GCUBEScopeManager |
|---|
GCUBEScopeManager.IllegalScopeException |
| Field Summary | |
|---|---|
protected GCUBELog |
logger
Object logger. |
protected String |
name
The name of the manager. |
protected Map<Thread,GCUBEScope> |
scopes
Cache of scope information indexed by thread id. |
| Fields inherited from interface org.gcube.common.core.scope.GCUBEScopeManager |
|---|
CLASS_HEADER_NAME, DEFAULT, NAME_HEADER_NAME, SCOPE_HEADER_NAME, SCOPE_NS |
| Constructor Summary | |
|---|---|
GCUBEScopeManagerImpl()
Creates a new instance. |
|
GCUBEScopeManagerImpl(GCUBELog logger)
Creates a new instance with a given logger. |
|
| Method Summary | |
|---|---|
protected String |
getName()
Returns the name with which the manager should log events. |
GCUBEScope |
getScope()
Gets the scope for outgoing calls in the current thread. |
void |
prepareCall(Remote remote,
String clazz,
String name,
GCUBEScope... scope)
Sets the scope for an outgoing call to a target gCube service. |
protected void |
setName(String name)
Sets the name with which the manager should log events |
void |
setScope(GCUBEScope scope)
Sets the scope of outgoing calls in the current thread. |
void |
setScope(Thread thread,
GCUBEScope... scope)
Sets the scope of outgoing calls in a given thread. |
void |
setScope(Thread thread,
GCUBEScope scope)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected GCUBELog logger
protected Map<Thread,GCUBEScope> scopes
protected String name
| Constructor Detail |
|---|
public GCUBEScopeManagerImpl()
public GCUBEScopeManagerImpl(GCUBELog logger)
logger - the logger.| Method Detail |
|---|
protected String getName()
protected void setName(String name)
name - the namepublic void setScope(GCUBEScope scope)
setScope in interface GCUBEScopeManagerscope - the scope.
public void setScope(Thread thread,
GCUBEScope scope)
throws GCUBEScopeManager.IllegalScopeException
GCUBEScopeManager.IllegalScopeException
public void setScope(Thread thread,
GCUBEScope... scope)
setScope in interface GCUBEScopeManagerthread - the thread.scope - (optional) the scope. If omitted, it defaults to the scope of the current thread.public GCUBEScope getScope()
getScope in interface GCUBEScopeManager
public void prepareCall(Remote remote,
String clazz,
String name,
GCUBEScope... scope)
prepareCall in interface GCUBEScopeManagerremote - the stub of the target port-type.clazz - the gCube class of the target service.name - the gCube name of the target service.scope - (optional) the scope of the call. If omitted, the scope associated with the current thread will be used.GCUBERemotePortTypeContext.getProxy(Remote, org.gcube.common.core.contexts.GCUBEServiceContext),
GCUBERemotePortTypeContext.getProxy(Remote, GCUBEScope, org.gcube.common.core.security.GCUBESecurityManager...),
GCUBERemotePortTypeContext.getProxy(Remote, GCUBEScopeManager, org.gcube.common.core.security.GCUBESecurityManager...)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||