|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.escot.Broker
A Broker manages a set of beans, the wires between them, and the set of features for each bean.
| Field Summary | |
protected com.sun.java.util.collections.List |
mBeanListeners
|
protected com.sun.java.util.collections.List |
mBeanWiringListeners
|
protected com.sun.java.util.collections.List |
mFeatureListeners
|
protected com.sun.java.util.collections.List |
mWiringListeners
|
| Constructor Summary | |
Broker()
|
|
| Method Summary | |
abstract void |
addBean(Object bean)
Adds bean to the set of beans brokered by this Broker instance. |
abstract void |
addBean(Object bean,
String id)
Adds bean to the set of beans brokered by this Broker instance. |
void |
addBeanWiringListener(BeanWiringListener listener)
Adds a listener to be notified of BeanWiringEvents. |
void |
addBrokerBeanListener(BrokerBeanListener listener)
Adds a listener to be notified of BrokerBeanEvents. |
void |
addBrokerFeatureListener(FeatureListener listener)
Adds a listener to be notified of FeatureEvents which are fired when a dynamic feature is added to or removed from a bean. |
void |
addBrokerWiringListener(WiringListener listener)
Adds a listener to be notified of WiringEvents. |
abstract boolean |
addEventBinding(Object source,
Object target,
String eventName)
Binds target as a listener to source for the specified event. |
abstract boolean |
canWire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
Returns whether the features may be connected. |
abstract Wire |
findWire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
Returns the wire between a published property and subscribing property, or null if it does not exist. |
abstract Object |
getBean(String id)
Returns the bean corresponding to the specified id. |
abstract com.sun.java.util.collections.Collection |
getBeans()
Returns a Collection of the beans brokered by this Broker instance. |
abstract com.sun.java.util.collections.Collection |
getExplicitFeatures(Object bean)
Returns a Collection of dynamic EscotFeatures. |
abstract EscotFeature |
getFeatureByName(Object bean,
String name)
Returns a EscotFeature corresponding to the specified name. |
abstract FeatureDescriptor |
getFeatureDescriptor(Object bean,
String name)
Returns the FeatureDescriptor corresponding to the named feature for the specified bean. |
abstract com.sun.java.util.collections.Collection |
getFeatures(Object bean)
Returns a Collection of EscotFeatures. |
abstract String |
getID(Object bean)
Returns the id corresponding to the specified bean. |
abstract com.sun.java.util.collections.Vector |
getWires()
Returns a Collection of Wires. |
abstract com.sun.java.util.collections.Collection |
getWires(Object bean,
String featureName)
Returns a Collection of Wires involving the specified bean. |
abstract boolean |
hasEventBinding(Object source,
Object target,
String eventName)
Returns whether target is bound as a listener to source for the specified event. |
boolean |
isWired(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
Returns whether the features are connected. |
protected void |
notifyBeanAdded(Object bean)
|
protected void |
notifyBeanRemoved(Object bean)
|
protected void |
notifyWireAdded(Wire wire)
|
protected void |
notifyWireRemoved(Wire wire)
|
abstract void |
removeAllBeans()
Removes all beans. |
abstract void |
removeBean(Object bean)
Removes bean from the set of beans brokered by this Broker instance. |
void |
removeBean(String id)
Removes bean from the set of beans brokered by this Broker instance. |
void |
removeBeanWiringListener(BeanWiringListener listener)
Removes a listener which is notified of BeanWiringEvents. |
void |
removeBrokerBeanListener(BrokerBeanListener listener)
Removes a listener which is notified of BrokerBeanEvents. |
void |
removeBrokerFeatureListener(FeatureListener listener)
Removes a listener which is notified of FeatureEvents. |
void |
removeBrokerWiringListener(WiringListener listener)
Removes a listener which is notified of WiringEvents. |
abstract void |
removeEventBinding(Object source,
Object target,
String eventName)
Removes binding of target as a listener to source for the specified event. |
abstract void |
unwire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
Disconnects a published property from a subscribing property. |
abstract void |
unwire(Wire wire)
Disconnects the properties specified in the Wire. |
abstract void |
unwireAll()
Disconnects everything. |
void |
unwireAll(Object bean)
Disconnects features of specified bean from everything else. |
void |
unwireAll(Object bean,
String featureName)
Disconnects a feature of a bean from everything. |
abstract void |
wire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
Connects a published property to a subscribing property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected com.sun.java.util.collections.List mBeanListeners
protected com.sun.java.util.collections.List mWiringListeners
protected com.sun.java.util.collections.List mBeanWiringListeners
protected com.sun.java.util.collections.List mFeatureListeners
| Constructor Detail |
public Broker()
| Method Detail |
public void addBrokerBeanListener(BrokerBeanListener listener)
listener - the listener to add.public void removeBrokerBeanListener(BrokerBeanListener listener)
listener - the listener to remove.public void addBrokerWiringListener(WiringListener listener)
listener - the listener to add.public void removeBrokerWiringListener(WiringListener listener)
listener - the listener to remove.public void addBeanWiringListener(BeanWiringListener listener)
listener - the listener to add.public void removeBeanWiringListener(BeanWiringListener listener)
listener - the listener to remove.public void addBrokerFeatureListener(FeatureListener listener)
listener - the listener to add.public void removeBrokerFeatureListener(FeatureListener listener)
listener - the listener to remove.public abstract Object getBean(String id)
public abstract String getID(Object bean)
public abstract void addBean(Object bean)
bean - the bean to add.
public abstract void addBean(Object bean,
String id)
bean - the bean to addid - an id to associate with the beanprotected void notifyBeanAdded(Object bean)
public abstract void removeBean(Object bean)
bean - the bean to removepublic void removeBean(String id)
id - id of the bean to removeprotected void notifyBeanRemoved(Object bean)
public abstract void removeAllBeans()
public abstract com.sun.java.util.collections.Collection getBeans()
public abstract Wire findWire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
public abstract void wire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
throws WiringException
publisher - a bean which publishes a propertypublisherPropName - name of a property of the publishersubscriber - a bean which subscribes to a propertysubscriberPropName - name of a property of the subscriberprotected void notifyWireAdded(Wire wire)
public abstract void unwire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
publisher - a bean which publishes a propertypublisherPropName - name of a property of the publishersubscriber - a bean which subscribes to a propertysubscriberPropName - name of a property of the subscriberpublic abstract void unwire(Wire wire)
protected void notifyWireRemoved(Wire wire)
public void unwireAll(Object bean)
public void unwireAll(Object bean,
String featureName)
public abstract void unwireAll()
public abstract boolean canWire(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
publisher - a bean which publishes a propertypublisherPropName - name of a property of the publishersubscriber - a bean which subscribes to a propertysubscriberPropName - name of a property of the subscriber
public boolean isWired(Object publisher,
String publisherPropName,
Object subscriber,
String subscriberPropName)
publisher - a bean which publishes a propertypublisherPropName - name of a property of the publishersubscriber - a bean which subscribes to a propertysubscriberPropName - name of a property of the subscriberpublic abstract com.sun.java.util.collections.Vector getWires()
public abstract com.sun.java.util.collections.Collection getWires(Object bean,
String featureName)
public abstract EscotFeature getFeatureByName(Object bean,
String name)
throws IntrospectionException
public abstract FeatureDescriptor getFeatureDescriptor(Object bean,
String name)
throws IntrospectionException
public abstract com.sun.java.util.collections.Collection getFeatures(Object bean)
public abstract com.sun.java.util.collections.Collection getExplicitFeatures(Object bean)
public abstract boolean addEventBinding(Object source,
Object target,
String eventName)
public abstract void removeEventBinding(Object source,
Object target,
String eventName)
public abstract boolean hasEventBinding(Object source,
Object target,
String eventName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||