|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.infobus.InfoBusMemberSupport | +--javax.infobus.InfoBusBeanSupport
Implements the methods of the InfoBusBean interface with the functionality specified by the InfoBus protocol. It is an extension of InfoBusMemberSupport which adds support for the setInfoBusName and getInfoBusName methods.
Methods documented here as "Internally Synchronized" contain internal synchronized blocks that lock on a common instance variable.
InfoBusBean
, Serialized FormConstructor Summary | |
InfoBusBeanSupport()
The no-argument constructor is provided for subclasses which want to be Serializable; it has the same effect as calling new InfoBusBeanSupport(null) |
|
InfoBusBeanSupport(InfoBusMember parent)
Creates a new InfoBusBeanSupport object, with both the infoBusName and InfoBus properties set to null. The parent parameter allows the parent of InfoBusBeanSupport
to implement the InfoBusMember interface and have the parent -- instead
of the InfoBusBeanSupport object -- specified in all PropertyChangeEvents
and on the InfoBus itself. |
|
InfoBusBeanSupport(InfoBusMember parent,
java.lang.String initialBusName)
Creates a new InfoBusBeanSupport object with the specified parent and sets the initial value of the
infoBusName property to supplied string. |
Method Summary | |
InfoBus |
getInfoBus()
Returns the InfoBus which is currently assigned to the InfoBusBeanSupport's InfoBus property. |
java.lang.String |
getInfoBusName()
Returns the String which is currently assigned to the InfoBusBeanSupport's infoBusName property. |
void |
leaveInfoBus()
Calls the leave method on the InfoBus to which this InfoBusBeanSupport is attached, effectively setting the InfoBus property to null. |
void |
rejoinInfoBus()
In cases where the infoBusName property is non-null but the infoBus property is null (for example after deserialization), the rejoinInfoBus method is used to cause the infoBus property to update to the name stored in infoBusName. |
void |
setInfoBus(InfoBus newInfoBus)
Attempts to set the InfoBus property and register with the InfoBus. |
void |
setInfoBusName(java.lang.String newBusName)
Attempts to set the infoBus property by setting the corresponding infoBusName property -- the infoBusName will only be updated if the infoBus can be changed to the bus named by newBusName. |
Methods inherited from class javax.infobus.InfoBusMemberSupport |
addInfoBusPropertyListener,
addInfoBusVetoableListener,
joinInfoBus,
joinInfoBus,
removeInfoBusPropertyListener,
removeInfoBusVetoableListener |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public InfoBusBeanSupport(InfoBusMember parent)
The parent
parameter allows the parent of InfoBusBeanSupport
to implement the InfoBusMember interface and have the parent -- instead
of the InfoBusBeanSupport object -- specified in all PropertyChangeEvents
and on the InfoBus itself. If parent
is null, the
InfoBusBeanSupport object is specified in these cases.
NOTE: if parent
is non-null, it must be Serializable if the
the InfoBusBeanSupport might be serialized -- in other
words, InfoBusBeanSupport can only serialize properly if parent
is Serializable.
parent
- used as the "source" of PropertyChangeEvents
issued by the InfoBusBeanSupport. If null, the InfoBusBeanSupport object
is used as the "source."public InfoBusBeanSupport(InfoBusMember parent, java.lang.String initialBusName)
parent
and sets the initial value of the
infoBusName property to supplied string. Although the infoBusName
is given an initial value, this constructor does not attempt to join
that InfoBus: the InfoBus property remains null. A join can be
initiated by calling rejoinInfoBus().
The parent
parameter allows the parent of InfoBusBeanSupport
to implement the InfoBusMember interface and have the parent -- instead
of the InfoBusBeanSupport object -- specified in all PropertyChangeEvents
and on the InfoBus itself. If parent
is null, the
InfoBusBeanSupport object is specified in these cases.
NOTE: if parent
is non-null, it must be Serializable if the
the InfoBusBeanSupport might be serialized -- in other
words, InfoBusBeanSupport can only serialize properly if parent
is Serializable.
parent
- used as the "source" of PropertyChangeEvents
issued by the InfoBusBeanSupport. If null, the InfoBusBeanSupport object
is used as the "source."initialBusName
- the initial value of the infoBusName property.public InfoBusBeanSupport()
new InfoBusBeanSupport(null)
Method Detail |
public void setInfoBus(InfoBus newInfoBus) throws java.beans.PropertyVetoException
Internally Synchronized.
newInfoBus
- the InfoBus that will be assigned to the InfoBus property
if the action is not vetoedpublic InfoBus getInfoBus()
Internally Synchronized.
public void setInfoBusName(java.lang.String newBusName) throws InfoBusMembershipException
Setting the infoBusName to null or the empty String ("") has the same effect as attempting a setInfoBus(null). Using "-default" causes the InfoBusBeanSupport to attempt to join its default bus, as described in InfoBusBean.
Internally Synchronized.
newBusName
- the name of the InfoBus which this InfoBusBean should
get and join. If null or empty String (""), directs the InfoBusBean to
leave its current bus (if any), making infoBus and infoBusName
properties nullInfoBusBean.setInfoBusName(java.lang.String)
public java.lang.String getInfoBusName()
Note that this method returns the empty String ("") when the infoBusName is null (to better support Bean builder property sheets).
Internally Synchronized.
InfoBusBean.getInfoBusName()
,
InfoBusBean.setInfoBusName(java.lang.String)
public void leaveInfoBus() throws InfoBusMembershipException, java.beans.PropertyVetoException
Internally Synchronized.
public void rejoinInfoBus() throws InfoBusMembershipException
This method is specific to InfoBusBeanSupport and not part of the InfoBusBean interface or the InfoBusMemberSupport.
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |