org.apache.shiro.env
Interface NamedObjectEnvironment

All Superinterfaces:
Environment
All Known Implementing Classes:
DefaultEnvironment, DefaultWebEnvironment, IniWebEnvironment, ResourceBasedWebEnvironment

public interface NamedObjectEnvironment
extends Environment

An environment that supports object lookup by name.

Since:
1.2

Method Summary
<T> T
getObject(String name, Class<T> requiredType)
          Returns the object in Shiro's environment with the specified name and type or null if no object with that name was found.
 
Methods inherited from interface org.apache.shiro.env.Environment
getSecurityManager
 

Method Detail

getObject

<T> T getObject(String name,
                Class<T> requiredType)
            throws RequiredTypeException
Returns the object in Shiro's environment with the specified name and type or null if no object with that name was found.

Type Parameters:
T - the type of the class
Parameters:
name - the assigned name of the object.
requiredType - the class to which the discovered object must be assignable.
Returns:
the object in Shiro's environment with the specified name (of the specified type) or null if no object with that name was found.
Throws:
RequiredTypeException - if the discovered object does not equal, extend, or implement the specified class.


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