|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--jp.gr.javacons.jim.DataHolder
DataHolder is an object class which holds the data exchanged between a DataProvider Bean and a GUI Bean. Normally, a DataProvider Bean converts information from the monitored device into a Java object, and stores it in a DataHolder object.
The DataHolder object holds the value, time stamp, and quality flag information, as data, which changes during run-time. If this information is changed by the setValue method, the event is informed to other objects that are registered as listeners to the DataHolder object.
In addition, the DataHolder object maintains a dataHolderName as well as other various parameters. At design-time, those settings can be modified using the editor for configuring DataProvider and GUI Beans.
コンストラクタの概要 | |
DataHolder()
DataHolder constructor |
メソッドの概要 | |
boolean |
addDataParameterChangeListener(DataParameterChangeListener listener)
This adds the DataParameterChangeListener object. |
boolean |
addDataValueChangeListener(DataValueChangeListener listener)
This adds the DataValueChangeListener object. |
void |
asyncRead()
This method calls the corresponding read method of the DataProvider object that holds this DataHolder object. |
void |
asyncWrite()
This method calls the corresponding write method of the DataProvider object that holds this DataHolder object. |
boolean |
containsParameterName(String paraName)
|
String |
getDataHolderName()
This returns the dataHolderName. |
DataProvider |
getDataProvider()
This returns the DataProvider object that holds this DataHolder object. |
Object |
getParameter(String paraName)
This returns the parameter value corresponding to the argument. |
Component |
getParameterEditor()
This returns the DataHolder parameter configuration editor corresponding to this DataHolder object. |
String[] |
getParameterNames()
This returns a list of the existing parameter names. |
QualityFlag |
getQualityFlag()
This returns the quality flag information. |
Date |
getTimeStamp()
This returns the time stamp information. |
Object |
getValue()
This returns the value. |
Class |
getValueClass()
This returns the Class object that represents the class of the object that can be set for the value. |
boolean |
isDataParameterChangeListenersEmpty()
|
boolean |
isDataValueChangeListenersEmpty()
|
boolean |
removeDataParameterChangeListener(DataParameterChangeListener listener)
This removes the DataParameterChangeListener object. |
boolean |
removeDataValueChangeListener(DataValueChangeListener listener)
This removes the DataValueChangeListener object. |
void |
setDataHolderName(String newName)
Sets newName as the dataHolderName. |
void |
setDataProvider(DataProvider dp)
Sets a DataProvider object. |
void |
setInitialParameter(String[] paraNames,
Object[] paraValues)
Sets the parameter types and initial values. |
void |
setInitialParameter(String paraName,
Object paraValue)
Sets the parameter type and initial value. |
void |
setInitialValueClass(Class valueClass)
Sets the class of the object, which will be held by value. |
void |
setParameter(String[] paraNames,
Object[] paraValues)
This sets the parameter value corresponding to the parameter name given by the argument, and generates a DataParameterChangeEvent. |
void |
setParameter(String paraName,
Object paraValue)
This sets the parameter value corresponding to the parameter name given by the argument, and generates a DataParameterChangeEvent. |
void |
setValue(Object val,
Date ts,
QualityFlag qf)
This changes information that relates to the value, and generates a DataValueChangeEvent. |
void |
syncRead()
This method calls the corresponding read method of the DataProvider object that holds this DataHolder object. |
void |
syncWrite()
This method calls the corresponding write method of the DataProvider object that holds this DataHolder object. |
String |
toString()
|
クラス java.lang.Object から継承したメソッド |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
コンストラクタの詳細 |
public DataHolder()
メソッドの詳細 |
public boolean addDataParameterChangeListener(DataParameterChangeListener listener)
public boolean addDataValueChangeListener(DataValueChangeListener listener)
public void asyncRead() throws DataProviderDoesNotSupportException
A DataProviderDoesNotSupportException is thrown if the corresponding method of the DataProvider object is not supported.
An IllegalStateException is thrown if this DataHolder object is not held by any DataProvider object.
public void asyncWrite() throws DataProviderDoesNotSupportException
A DataProviderDoesNotSupportException is thrown if the corresponding method of the DataProvider object is not supported.
An IllegalStateException is thrown if this DataHolder object is not held by any DataProvider object.
public boolean containsParameterName(String paraName)
public String getDataHolderName()
public DataProvider getDataProvider()
public Object getParameter(String paraName)
An IllegalArgumentException is thrown if the parameter corresponding to the argument does not exist.
public Component getParameterEditor()
public String[] getParameterNames()
public QualityFlag getQualityFlag()
public Date getTimeStamp()
public Object getValue()
public Class getValueClass()
In the case of no special redefinition in a subclass, the Class object set by the setInitialValueClass method immediately after generation of DataHolder object is returned.
An IllegalStateException is thrown if the Class object has not been set yet.
public boolean isDataParameterChangeListenersEmpty()
public boolean isDataValueChangeListenersEmpty()
public boolean removeDataParameterChangeListener(DataParameterChangeListener listener)
public boolean removeDataValueChangeListener(DataValueChangeListener listener)
public void setDataHolderName(String newName)
public void setDataProvider(DataProvider dp)
This method should not be called from other methods than the addDataHolder and removeDataHolder methods of DataProvider. In the addDataHolder methodof DataProvider, this setDataProvider method must be called after the DataProvider object adds this DataHolder object in it and becomes the state in which a return value of the getDataHolder method of DataProvider is this DataHolder obejct.
An IllegalArgumentException is thrown if a return value of the getDataHolder object of the DataProvider object provided as an argument is not this DataHolder object. (The getDataHolder method of DataProvider must return a DataHolder object even if the owner of the added DataHolder object has not been set yet)
public void setInitialParameter(String[] paraNames, Object[] paraValues)
Normally, this method is called immediately after creation of an instance of DataHolder but prior to it being held by a DataProvider object.
The "name" and "valueClass" cannot be used in the parameter name argument.
An IllegalStateException is thrown if this method is called when already held by a DataProvider object. An IllegalParameterException is thrown if "name" or "valueClass" is used as the paraName(s) argument.
public void setInitialParameter(String paraName, Object paraValue)
Normally, this method is called immediately after creation of an instance of DataHolder but prior to it being held by a DataProvider object.
The "name" and "valueClass" cannot be used in the parameter name argument.
An IllegalStateException is thrown if this method is called when already held by a DataProvider object. An IllegalParameterException is thrown if "name" or "valueClass" is used as the paraName(s) argument.
public void setInitialValueClass(Class valueClass)
Normally, this method is called immediately after creation of an instance of DataHolder, but prior to being held by a DataProvider object.
An IllegalStateException occurs if this method is called when already held by a DataProvider object. In addition, an IllegalStateException is thrown if any class has already been set, i.e., if any class is returned by the getValueClass method when this method is called. An IllegalArgumentException is thrown if null is set.
public void setParameter(String[] paraNames, Object[] paraValues)
An IllegalParameterException is thrown if an attempt is made to set the parameter value of a parameter name not already set by the setInitialParameter method.
public void setParameter(String paraName, Object paraValue)
An IllegalParameterException is thrown if an attempt is made to set the parameter value of a parameter name not already set by the setInitialParameter method.
public void setValue(Object val, Date ts, QualityFlag qf)
An IllegalValueClassException occurs if false is returned by the isInstance(Object) method for the Class object returned from the getValueClass method.
public void syncRead() throws DataProviderDoesNotSupportException
A DataProviderDoesNotSupportException is thrown if the corresponding method of the DataProvider object is not supported.
An IllegalStateException is thrown if this DataHolder object is not held by any DataProvider object.
public void syncWrite() throws DataProviderDoesNotSupportException
A DataProviderDoesNotSupportException is thrown if the corresponding method of the DataProvider object is not supported.
An IllegalStateException is thrown if this DataHolder object is not held by any DataProvider object.
public String toString()
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |