Package org.puremvc.java.interfaces
Interface IModel
- All Known Implementing Classes:
Model
public interface IModel
The interface definition for a PureMVC Model.
In PureMVC, IModel
implementors provide
access to IProxy
objects by named lookup.
An IModel
assumes these responsibilities:
- Maintain a cache of
IProxy
instances - Provide methods for registering, retrieving, and removing
IProxy
instances
-
Method Summary
Modifier and Type Method Description boolean
hasProxy(java.lang.String proxyName)
Check if a Proxy is registeredvoid
registerProxy(IProxy proxy)
Register anIProxy
instance with theModel
.IProxy
removeProxy(java.lang.String proxyName)
Remove anIProxy
instance from the Model.IProxy
retrieveProxy(java.lang.String proxyName)
Retrieve anIProxy
instance from the Model.
-
Method Details
-
registerProxy
Register an
IProxy
instance with theModel
.- Parameters:
proxy
- an object reference to be held by theModel
.
-
retrieveProxy
Retrieve an
IProxy
instance from the Model.- Parameters:
proxyName
- proxy name- Returns:
- the
IProxy
instance previously registered with the givenproxyName
.
-
removeProxy
Remove an
IProxy
instance from the Model.- Parameters:
proxyName
- name of theIProxy
instance to be removed.- Returns:
- the
IProxy
that was removed from theModel
-
hasProxy
boolean hasProxy(java.lang.String proxyName)Check if a Proxy is registered
- Parameters:
proxyName
- proxy name- Returns:
- whether a Proxy is currently registered with the given
proxyName
.
-