javax.infobus
Interface InfoBusMember

All Known Subinterfaces:
InfoBusBean
All Known Implementing Classes:
InfoBusMemberSupport

public abstract interface InfoBusMember

All InfoBusMembers are required to implement a constrained property called infoBus -- this interface guarantees the presence of that property. The InfoBus attempts to set it when a connection is requested by the Member, and the attempt may be vetoed if the property has already been set by a builder tool. An implementation of this interface is provided in the InfoBusMemberSupport class.

See Also:
InfoBusMemberSupport

Method Summary
 void addInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
          Adds a PropertyChangeListener that will be alerted whenever the InfoBusMember's setInfoBus method is called and not vetoed.
 void addInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
          Adds a VetoableChangeListener to the list of listeners that will be alerted whenever the InfoBusMember's setInfoBus method is called.
 InfoBus getInfoBus()
          Returns the InfoBus which is currently assigned to the InfoBusMember's InfoBus property.
 void removeInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
          Removes a PropertyChangeListener from the list of listeners requesting notification of an InfoBus change.
 void removeInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
          Removes a VetoableChangeListener from the list of listeners that will be alerted whenever the InfoBusMember's setInfoBus method is called.
 void setInfoBus(InfoBus newInfoBus)
          Sets the InfoBus object for this InfoBusMember, if not vetoed.
 

Method Detail

setInfoBus

public void setInfoBus(InfoBus newInfoBus)
                throws java.beans.PropertyVetoException
Sets the InfoBus object for this InfoBusMember, if not vetoed. When an InfoBusMember joins an InfoBus (via InfoBus.join), the responding InfoBus uses this method to set the member's InfoBus property to itself.

Whenever this method is called, the InfoBusMember should create a PropertyChangeEvent and send it to all registered VetoableChangeListeners, which gives a third party an opportunity to reject the change and throw the PropertyVetoException.

When a setInfoBus is successful (not vetoed), the InfoBusMember must notify its PropertyChangeListeners of the new value and MUST call the register() method on the new InfoBus value to establish itself as a participant there.

Parameters:
newInfoBus - the InfoBus which will be assigned to the InfoBus property if the action is not vetoed
Throws:
java.beans.PropertyVetoException - if one or more of the VetoableChangeListeners reject the proposed change of InfoBus

getInfoBus

public InfoBus getInfoBus()
Returns the InfoBus which is currently assigned to the InfoBusMember's InfoBus property.
Returns:
the current value of the InfoBus property

addInfoBusVetoableListener

public void addInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
Adds a VetoableChangeListener to the list of listeners that will be alerted whenever the InfoBusMember's setInfoBus method is called. Any of these listeners can veto the setInfoBus action by throwing a PropertyVetoException.
Parameters:
vcl - the VetoableChangeListener to be added

removeInfoBusVetoableListener

public void removeInfoBusVetoableListener(java.beans.VetoableChangeListener vcl)
Removes a VetoableChangeListener from the list of listeners that will be alerted whenever the InfoBusMember's setInfoBus method is called.
Parameters:
vcl - the VetoableChangeListener to be removed

addInfoBusPropertyListener

public void addInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
Adds a PropertyChangeListener that will be alerted whenever the InfoBusMember's setInfoBus method is called and not vetoed.
Parameters:
pcl - the PropertyChangeListener to be alerted

removeInfoBusPropertyListener

public void removeInfoBusPropertyListener(java.beans.PropertyChangeListener pcl)
Removes a PropertyChangeListener from the list of listeners requesting notification of an InfoBus change.
Parameters:
pcl - the PropertyChangeListener to be removed