Interface ObjectDataRemover<T>

  • Type Parameters:
    T - the type of the object to remove
    All Known Implementing Classes:

    public interface ObjectDataRemover<T>
    An ObjectDataRemover is an entity that has the ability to remove an object. The actual source and method that are used for removing the object is completely up to the implementation. The most common scenario is that the remover uses an OutputDataSource that is able to remove the object that the source points to.
    • Method Detail

      • removeObject

        Optional<T> removeObject​(GluonObservableObject<T> observable)
                          throws IOException
        Removes the object and optionally returns an object. The actual method that removes the object is completely left to the implementation. This method is called by DataProvider.removeObject(GluonObservableObject, ObjectDataRemover) to initiate the actual removal process. If this method returns a non-empty Optional, the object that is contained in the Optional will be set on the provided observable object. Otherwise, the value of the observable object will be set to null. When the remove operation completed successfully, the state of the provided observable will be set to ConnectState.REMOVED.
        observable - the observable object that needs to be removed
        an optional containing an object that will ultimately be set on the provided GluonObservableObject
        IOException - when an exception occurred during the removal process