org.apache.shiro.mgt
Class DefaultSubjectFactory

java.lang.Object
  extended by org.apache.shiro.mgt.DefaultSubjectFactory
All Implemented Interfaces:
SubjectFactory

public class DefaultSubjectFactory
extends Object
implements SubjectFactory

Default SubjectFactory implementation that creates DelegatingSubject instances.

Since:
1.0
Author:
Les Hazlewood

Constructor Summary
DefaultSubjectFactory()
           
 
Method Summary
 Subject createSubject(SubjectContext context)
          Creates a new Subject instance reflecting the state of the specified contextual data.
protected  Subject newSubjectInstance(PrincipalCollection principals, boolean authenticated, String host, Session session, SecurityManager securityManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSubjectFactory

public DefaultSubjectFactory()
Method Detail

createSubject

public Subject createSubject(SubjectContext context)
Description copied from interface: SubjectFactory
Creates a new Subject instance reflecting the state of the specified contextual data. The data would be anything required to required to construct a Subject instance and its contents can vary based on environment. Any data supported by Shiro core will be accessible by one of the accessor methods. All other data is available as map attributes.

Specified by:
createSubject in interface SubjectFactory
Parameters:
context - the contextual data to be used by the implementation to construct an appropriate Subject instance.
Returns:
a Subject instance created based on the specified context.

newSubjectInstance

protected Subject newSubjectInstance(PrincipalCollection principals,
                                     boolean authenticated,
                                     String host,
                                     Session session,
                                     SecurityManager securityManager)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.