org.objectweb.easybeans.security.propagation.jonas
Class JOnASSecurityCurrent

java.lang.Object
  extended by org.objectweb.easybeans.security.propagation.jonas.JOnASSecurityCurrent
All Implemented Interfaces:
EZBSecurityCurrent

public class JOnASSecurityCurrent
extends java.lang.Object
implements EZBSecurityCurrent

Allow to get the JOnAS security context.

Author:
Florent Benoit

Field Summary
private static java.lang.String JONAS_SECURITY_CONTEXT
          Name of the JOnAS context class.
private static java.lang.String JONAS_SECURITY_CURRENT
          Name of the JOnAS class.
private static java.lang.Object jonasSecurityCurrent
          Unique instance of the JOnAS security current object.
 
Fields inherited from interface org.objectweb.easybeans.security.api.EZBSecurityCurrent
SECURITY_CURRENT_PROPERTY
 
Constructor Summary
JOnASSecurityCurrent()
           
 
Method Summary
 EZBSecurityContext getSecurityContext()
          Gets the current context.
private static java.lang.Object initCurrent()
          Init the current object (if not already done).
 void setGlobalSecurityContext(EZBSecurityContext securityContext)
          Associates the given security context to all threads (JVM).
 void setSecurityContext(EZBSecurityContext securityContext)
          Associates the given security context to the current thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JONAS_SECURITY_CURRENT

private static final java.lang.String JONAS_SECURITY_CURRENT
Name of the JOnAS class.

See Also:
Constant Field Values

JONAS_SECURITY_CONTEXT

private static final java.lang.String JONAS_SECURITY_CONTEXT
Name of the JOnAS context class.

See Also:
Constant Field Values

jonasSecurityCurrent

private static java.lang.Object jonasSecurityCurrent
Unique instance of the JOnAS security current object.

Constructor Detail

JOnASSecurityCurrent

public JOnASSecurityCurrent()
Method Detail

initCurrent

private static java.lang.Object initCurrent()
Init the current object (if not already done).

Returns:
JOnAS security current object.

getSecurityContext

public EZBSecurityContext getSecurityContext()
Gets the current context.

Specified by:
getSecurityContext in interface EZBSecurityCurrent
Returns:
SecurityContext return the Security context associated to the current thread or the JVM

setSecurityContext

public void setSecurityContext(EZBSecurityContext securityContext)
Associates the given security context to the current thread.

Specified by:
setSecurityContext in interface EZBSecurityCurrent
Parameters:
securityContext - Security context to associate to the current thread.

setGlobalSecurityContext

public void setGlobalSecurityContext(EZBSecurityContext securityContext)
Associates the given security context to all threads (JVM).

Specified by:
setGlobalSecurityContext in interface EZBSecurityCurrent
Parameters:
securityContext - Security context to associate to the JVM