|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.beans.beancontext.BeanContextChildSupport
equip.data.beans.PropertySubscriberBean
take a tuple from a dataspace and present as a bean property. monitors data item(s) of the form generated by PropertyPublisherBean and maps to a regular bean property and optionally sets anther beans property to match. This bean monitor assumes that there will only be at most one data item with the given class and item name. If more exist then the most recently added will be used. PropertyPublisherBean publishes a data item of class equip.data.Tuple with two fields. The first is a equip.data.StringBox with the nominal class name of the tuple, and the second is the property value itself (if a subclass of equip.runtime.ValueBase) or an equip.data.SerializedObject (if the property value is serializable). The name of the item (field of equip.data.ItemData) is also set by configuration to identify individual data items. The GUID is arbitrary and allocated on creation. To be active we need: - a dataspace (reference to equip.data.beans.DataspaceBean) - a tuple nominal class name (String) - a data item name (String) For the optional property push mode, i.e. setting another bean's property we also need: - a reference to the bean (java.lang.Object) - the name of the property to be set on that bean. In any case, the value is made available as the bean property 'value', of type java.lang.Object which supports PropertyChangeListeners.
| Field Summary | |
boolean |
debug
debug |
protected DataSession |
dsSession
dataspace callback session |
protected GUID |
mCurrentItemId
dataspace current item id |
protected DataspaceBean |
mDataspace
dataspace |
protected boolean |
mIsConnected
active/connected |
protected java.lang.String |
mItemClassName
item class name |
protected java.util.Vector |
mItemIds
dataspace time-order list of matching item ids |
protected java.lang.String |
mItemName
item name |
protected boolean |
mPushActive
push active |
protected java.lang.Class |
mPushPropertyClass
push target property type/class |
protected java.lang.String |
mPushPropertyName
push target property name |
protected java.lang.Object |
mPushTarget
push target as object |
protected java.lang.Object |
mValue
last value |
| Fields inherited from class java.beans.beancontext.BeanContextChildSupport |
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport |
| Constructor Summary | |
PropertySubscriberBean()
no-arg constructor - required |
|
| Method Summary | |
protected ItemData |
createItemTemplate()
create item template |
void |
dataspaceEvent(DataspaceEvent event)
notify of event (cf DataCallbackPost) |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
fire property changed |
DataspaceBean |
getDataspace()
source getter |
boolean |
getDebug()
|
java.lang.String |
getItemClassName()
item name getter |
java.lang.String |
getItemName()
item name getter |
java.lang.String |
getPushPropertyName()
property name getter |
java.lang.Object |
getPushTarget()
source getter |
java.lang.Object |
getValue()
value proxy |
void |
setDataspace(DataspaceBean dataspace)
dataspace setter - initialisation time only |
void |
setDebug(boolean d)
|
void |
setItemClassName(java.lang.String itemClassName)
item class name setter - initialisation time only |
void |
setItemName(java.lang.String itemName)
item name setter - initialisation time only |
void |
setPushPropertyName(java.lang.String pushPropertyName)
property name setter - initialisation time only |
void |
setPushTarget(java.lang.Object pushTarget)
push target setter - initialisation time only |
| Methods inherited from class java.beans.beancontext.BeanContextChildSupport |
addPropertyChangeListener, addVetoableChangeListener, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public boolean debug
protected java.lang.Object mValue
protected java.lang.Object mPushTarget
protected java.lang.String mPushPropertyName
protected java.lang.Class mPushPropertyClass
protected DataspaceBean mDataspace
protected java.lang.String mItemName
protected java.lang.String mItemClassName
protected boolean mIsConnected
protected boolean mPushActive
protected GUID mCurrentItemId
protected java.util.Vector mItemIds
protected DataSession dsSession
| Constructor Detail |
public PropertySubscriberBean()
| Method Detail |
public void setDebug(boolean d)
public boolean getDebug()
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
public void setPushTarget(java.lang.Object pushTarget)
public java.lang.Object getPushTarget()
public void setPushPropertyName(java.lang.String pushPropertyName)
public java.lang.String getPushPropertyName()
public void setItemName(java.lang.String itemName)
public java.lang.String getItemName()
public void setItemClassName(java.lang.String itemClassName)
public java.lang.String getItemClassName()
public void setDataspace(DataspaceBean dataspace)
public DataspaceBean getDataspace()
protected ItemData createItemTemplate()
public void dataspaceEvent(DataspaceEvent event)
dataspaceEvent in interface DataspaceEventListenerpublic java.lang.Object getValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||