Files
Brainstorm/Foundation/src/com/foundation/view/IMethodAssociation.java
2014-05-30 10:31:51 -07:00

46 lines
2.3 KiB
Java

/*
* Copyright (c) 2003,2007 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.foundation.view;
public interface IMethodAssociation extends IValueHolderAssociation, IValueHolderListener {
/**
* Invokes the method on the held value.
* @param parameters The parameters for the method. This may be null if there are no parameters.
* @param synchronous Whether the invokation should be synchronous (on this same thread).
* @return The return value for the method.
*/
public Object invoke(Object[] parameters, boolean synchronous);
/**
* Invokes the method on the specified value. This method must be called for method associations that are not connected to a value holder.
* @param value The value to invoke the method on.
* @param parameters The parameters for the method. This may be null if there are no parameters.
* @param synchronous Whether the invokation should be synchronous (on this same thread).
* @return The return value for the method.
*/
public Object invoke(Object value, Object[] parameters, boolean synchronous);
/**
* Gets whether the association is connected via a value holder.
* @return Whether there is a value holder connection for this association.
*/
public boolean getIsValueHolderAssociated();
/**
* Registers the method association to begin receiving updates from the associated value holder.
* <p>Note: This is only used if this method is associated with a value holder, and is a 'getter' type method.</p>
*/
public void register();
/**
* Unregisters the method association to stop receiving updates from the associated value holder.
* <p>Note: This is only used if this method is associated with a value holder, and is a 'getter' type method.</p>
*/
public void unregister();
/**
* Sets the change listener that will be called, if the method is registered and is value holder bound, when the value holder's held value changes.
* @param listener The listener to be notified when the associated value holder's held value changes.
*/
public void setChangeListener(IMethodAssociationChangeListener listener);
}//IMethodAssociation//