jp.gr.javacons.jim
インタフェース DataReferenceMaintainer

既知の実装クラスの一覧:
DataReferencer

public interface DataReferenceMaintainer

The DataReferenceMaintainer interface provides methods that are called by the Manager object when an object implementing the DataReferenceMaintainer interface is registered or deregistered with the Manager object. In addition, it provides methods that are called by the Manager object to maintain the consistency of the reference relation in response to changes such as creation, deletion or name change of the DataProvider or the DataHolder objects referred.

When the DataReferenceMaintainer object is registered with the addDataReferenceMaintainer method of Manager, the Manager object invokes the addedAsDataReferenceMaintainer method. It is necessary for this method to be implemented such that the creation of the reference relation is only performed if the suitable DataHolder object(s) can be acquired from the Manager object. The DataReferenceMaintainer object holds the character string information to identify the DataHolder object(s), and it utilizes the information to acquire the DataHolder object(s).

When the DataReferenceMaintainer object is deregistered by the removeDataReferenceMaintainer method of Manger, the Manager object invokes the removedAsDataReferenceMaintainer method. It is necessary to implement this method such that the reference relation to the DataHolder object(s) is released.

In the case where the DataReferenceMaintainer object is registered with the Manager object, if the DataProvider object or the DataHolder object that is maintained by the Manager object changes, the appropriate method provided by DataReferenceMaintainer interface is automatically invoked by the Manager object according to the change. When the DataReferenceMaintainer interface is implemented, each method should be defined appropriately to maintain consistency in the reference relationship.


メソッドの概要
 void addedAsDataReferenceMaintainer()
          This method makes the reference relation to the DataHolder object(s) acquired from the Manager object.
 void dataHolderAvailable(DataProvider dp, DataHolder[] dhs)
          If the object to be referred to is included in the arguments and this DataReferenceMaintainer object has not been related to the object yet, the process of making the relation is performed.
 void dataHolderRenamed(DataProvider dp, DataHolder dh, String newName, String oldName)
          This changes the character string information to newName if the DataHolder object, that has an established reference relation, has character string information which corresponds to oldName.
 void dataHolderRevoked(DataProvider dp, DataHolder[] dhs)
          If the object that this DataReferenceMaintainer object refers to is included in the argument, this method performs the release of the relation with the object.
 void dataProviderAvailable(DataProvider dp, DataHolder[] dhs)
          If the object to be referred to is included in the arguments and this DataReferenceMaintainer object has not been related to the object yet, the process of making the relation is performed.
 void dataProviderRenamed(DataProvider dp, String newName, String oldName)
          If oldName corresponds to the character string information that identifies the DataProvider object which holds the DataHolder object to which a reference relation is already established, the character string information is changed to newName.
 void dataProviderRevoked(DataProvider dp, DataHolder[] dhs)
          If an object that this DataReferenceMaintainer object refers to is included in the argument, this method performs the release of the relation with the obejct.
 void removedAsDataReferenceMaintainer()
          The reference relation to the DataHolder object(s) is released.
 

メソッドの詳細

addedAsDataReferenceMaintainer

public void addedAsDataReferenceMaintainer()
This method makes the reference relation to the DataHolder object(s) acquired from the Manager object.

This method is invoked by the Manager object when registered with the Manager object.


dataHolderAvailable

public void dataHolderAvailable(DataProvider dp,
                                DataHolder[] dhs)
If the object to be referred to is included in the arguments and this DataReferenceMaintainer object has not been related to the object yet, the process of making the relation is performed.

This method is invoked when the DataHolder objects in the second argument are added to the DataProvider object of the first argument, which has been registered with the Manager object.


dataHolderRenamed

public void dataHolderRenamed(DataProvider dp,
                              DataHolder dh,
                              String newName,
                              String oldName)
This changes the character string information to newName if the DataHolder object, that has an established reference relation, has character string information which corresponds to oldName. Otherwise if the character string information corresponds to newName and a reference relation has not yet been established, an attempt is made to acquire and establish a reference to the DataHolder.

This method is invoked when there is a change in the dataHolderName of the DataHolder object of the second argument, which is held by the DataProvider object of the first argument which has been registered with the Manager object.


dataHolderRevoked

public void dataHolderRevoked(DataProvider dp,
                              DataHolder[] dhs)
If the object that this DataReferenceMaintainer object refers to is included in the argument, this method performs the release of the relation with the object.

This method is invoked when the DataHolder object(s) in the second argument are deleted from the DataProvider object of the first argument, which has been registered with the Manager object.


dataProviderAvailable

public void dataProviderAvailable(DataProvider dp,
                                  DataHolder[] dhs)
If the object to be referred to is included in the arguments and this DataReferenceMaintainer object has not been related to the object yet, the process of making the relation is performed.

This method is invoked when the DataProvider object of the first argument is registered to the Manager object.


dataProviderRenamed

public void dataProviderRenamed(DataProvider dp,
                                String newName,
                                String oldName)
If oldName corresponds to the character string information that identifies the DataProvider object which holds the DataHolder object to which a reference relation is already established, the character string information is changed to newName. Otherwise if the character string information which identifies the DataProvider object corresponds to newName and no reference relation has yet been estabilished, an attempt is made to acquire the DataHolder object for reference to, and to establish the reference relation.

This method is invoked when there is a change in the dataProviderName of the DataProvider object of the first argument, which has been registered with the Manager object.


dataProviderRevoked

public void dataProviderRevoked(DataProvider dp,
                                DataHolder[] dhs)
If an object that this DataReferenceMaintainer object refers to is included in the argument, this method performs the release of the relation with the obejct.

This method is invoked when the DataProvider object of the first argument is deregistered from the Manager object.


removedAsDataReferenceMaintainer

public void removedAsDataReferenceMaintainer()
The reference relation to the DataHolder object(s) is released.

This method is invoked at deregistration from the Manager object.