Package org.apache.shiro.realm
Interface RealmFactory
-
- All Known Implementing Classes:
JndiRealmFactory
public interface RealmFactory
Enables Shiro end-users to configure and initialize one or moreRealm
instances in any manner desired. This interface exists to support environments where end-users may not wish to use Shiro's default text-based configuration to create and configure realms, and instead wish to retrieve a realm configured in a proprietary manner. An implementation of this interface can access that proprietary mechanism to retrieve the already-created Realms.The
Realm
instances returned will used to construct the application'sSecurityManager
instance.- Since:
- 0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<Realm>
getRealms()
Returns a collection ofRealm
instances that will be used to construct the application's SecurityManager instance.
-
-
-
Method Detail
-
getRealms
Collection<Realm> getRealms()
Returns a collection ofRealm
instances that will be used to construct the application's SecurityManager instance.The order of the collection is important. The
SecurityManager
implementation will consult the Realms during authentication (log-in) and authorization (access control) operations in the collection's iteration order. That is, the resulting collection'sIterator
determines the order in which Realms are used.- Returns:
- the
Collection
of Realms that the application'sSecurityManager
will use for security data access.
-
-