Package org.apache.shiro.mgt
Class DefaultSubjectFactory
- java.lang.Object
-
- org.apache.shiro.mgt.DefaultSubjectFactory
-
- All Implemented Interfaces:
SubjectFactory
public class DefaultSubjectFactory extends Object implements SubjectFactory
DefaultSubjectFactoryimplementation that createsDelegatingSubjectinstances.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description DefaultSubjectFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SubjectcreateSubject(SubjectContext context)Creates a new Subject instance reflecting the state of the specified contextual data.protected SubjectnewSubjectInstance(PrincipalCollection principals, boolean authenticated, String host, Session session, SecurityManager securityManager)Deprecated.since 1.2 - overridecreateSubject(org.apache.shiro.subject.SubjectContext)directly if you need to instantiate a customSubjectclass.
-
-
-
Method Detail
-
createSubject
public Subject createSubject(SubjectContext context)
Description copied from interface:SubjectFactoryCreates a new Subject instance reflecting the state of the specified contextual data. The data would be anything required to required to construct aSubjectinstance and its contents can vary based on environment. Any data supported by Shiro core will be accessible by one of theSubjectContext'sget*orresolve*methods. All other data is available as mapattributes.- Specified by:
createSubjectin interfaceSubjectFactory- Parameters:
context- the contextual data to be used by the implementation to construct an appropriateSubjectinstance.- Returns:
- a
Subjectinstance created based on the specified context. - See Also:
SubjectContext
-
newSubjectInstance
@Deprecated protected Subject newSubjectInstance(PrincipalCollection principals, boolean authenticated, String host, Session session, SecurityManager securityManager)
Deprecated.since 1.2 - overridecreateSubject(org.apache.shiro.subject.SubjectContext)directly if you need to instantiate a customSubjectclass.
-
-