O
- The type parameter representing the concrete type of the component owner.public static interface Component.OwnerChangeRequest<O>
Component.OwnerChangeRequest
implementation instances will be passed to
the Component.update(OwnerChangeRequest)
method which inform a
given component about a state change related to said component.
They are used by component owners to communicate and
negotiate update events to their components using the Component.IsBeing
enum and
some useful methods providing both a context for a component and the ability
for the component to trigger the state change itself.Modifier and Type | Method and Description |
---|---|
boolean |
executeChange()
This method will trigger the actual state change identified by the
Component.IsBeing
constant returned by the type() method. |
O |
getNewOwner() |
O |
getOldOwner() |
default Component.IsBeing |
type()
This method will return one of the following states:
Component.IsBeing.ADDED , Component.IsBeing.REMOVED , Component.IsBeing.REPLACED , Component.IsBeing.UPDATED |
O getOldOwner()
O getNewOwner()
boolean executeChange()
Component.IsBeing
constant returned by the type()
method.
It exists so that a component can decide when the change should occur.
If the change type is set to Component.IsBeing.ADDED
for example then this would
mean that after calling this method, the current component will now be a
component of the current component owner.default Component.IsBeing type()
Component.IsBeing.ADDED
, Component.IsBeing.REMOVED
, Component.IsBeing.REPLACED
, Component.IsBeing.UPDATED