org.puremvc.java.interfaces.IProxy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of PureMVC Show documentation
Show all versions of PureMVC Show documentation
PureMVC is a lightweight framework for creating applications
based upon the classic Model-View-Controller design
meta-pattern. This is the specific implementation for the Java
language. It does not support modular programming since it
uses Singletons as Core actors rather than the Multiton used in
the MultiCore Version.
The newest version!
//
// PureMVC Java Standard
//
// Copyright(c) 2019 Saad Shams
// Your reuse is governed by the Creative Commons Attribution 3.0 License
//
package org.puremvc.java.interfaces;
/**
* The interface definition for a PureMVC Proxy.
*
* In PureMVC, IProxy
implementors assume these responsibilities:
*
*
* - Implement a common method which returns the name of the Proxy.
* - Provide methods for setting and getting the data object.
*
*
* Additionally, IProxy
s typically:
*
*
* - Maintain references to one or more pieces of model data.
* - Provide methods for manipulating that data.
* - Generate
INotifications
when their model data changes.
* - Expose their name as a
public static const
called NAME
, if they are not instantiated multiple times.
* - Encapsulate interaction with local or remote services used to fetch and persist model data.
*
*/
public interface IProxy extends INotifier {
/**
* Get the Proxy name
*
* @return the Proxy instance name
*/
String getProxyName();
/**
* Set the data object
*
* @param data the data object
*/
void setData(Object data);
/**
* Get the data object
*
* @return the data as type Object
*/
Object getData();
/**
* Called by the Model when the Proxy is registered
*/
void onRegister();
/**
* Called by the Model when the Proxy is removed
*/
void onRemove();
}