Package org.refcodes.component
Interface Configurable<CTX>
-
- Type Parameters:
CTX
- the context used to initialize the implementing instance.
- All Known Subinterfaces:
CompositeComponent.ExtendedCompositeComponent<CTX,CON>
,Configurable.ConfigureAutomaton<CTX>
,ConfigurableComponent<CTX>
,ConfigurableLifeCycleComponent<CTX>
,ConfigurableLifeCycleComponent.ConfigurableLifeCycleAutomaton<CTX>
- All Known Implementing Classes:
CompositeComponentImpl.ExtendedCompositeComponentImpl
,ConfigurableLifeCycleAutomatonImpl
public interface Configurable<CTX>
This mixin might be implemented by a component in order to provide initialize facilities wit a configuration provided viainitialize(Object)
.In case a no context is to be provided to the
initialize(Object)
method (as it may have been passed via the constructor), you may use theInitializable
interface with itsInitializable.initialize()
method, which does not require any arguments specifying a context.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Configurable.ConfigureAutomaton<CTX>
TheConfigurable.ConfigureAutomaton
interface defines those methods related to the initialize life-cycle with a provided context.static interface
Configurable.ConfigureBuilder<CTX,B extends Configurable.ConfigureBuilder<CTX,B>>
To enable theInitializable
functionality to be invoked in a builder chain.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
initialize(CTX aContext)
Initializes and configures the component.default void
initializeUnchecked(CTX aContext)
Initializes the component by callinginitialize(Object)
without you to require catching anConfigureException
.
-
-
-
Method Detail
-
initialize
void initialize(CTX aContext) throws InitializeException
Initializes and configures the component.- Parameters:
aContext
- The context to be passed to the implementing instance.- Throws:
InitializeException
- Thrown in case initializing fails.
-
initializeUnchecked
default void initializeUnchecked(CTX aContext)
Initializes the component by callinginitialize(Object)
without you to require catching anConfigureException
.- Parameters:
aContext
- The context to be passed to the implementing instance.- Throws:
org.refcodes.exception.HiddenException
- encapsulates the cause and is thrown upon encountering aConfigureException
exception
-
-