Commit graph

33 commits

Author SHA1 Message Date
68a337ec6a Component state and registry - Drivers support
A component with "drivers" will initialise/start its drivers after it is
initialised/started itself. It will also stop/destroy non-driver reverse
dependencies before stopping/destroying its drivers.
2015-09-17 10:57:46 +02:00
81ea62047e Component state and registry - fixes and refactoring
* Errors during shutdown or destruction will be thrown as exceptions.
Returning the collection of errors was clumsy, at best - if something
goes wrong, the registry has failed anyway.
* Recursive initialisation and destruction methods in ComponentState
* Use ComponentState's methods while initialising, starting up, shutting
down or destroying the registry.
2015-09-17 10:18:09 +02:00
7f919349e9 Depend on current ebul-func snapshot 2015-09-17 09:44:12 +02:00
7558594ded Lifecycle stage enum describes exception types 2015-09-17 09:18:41 +02:00
8314429023 Component lifecycle exceptions
Common base class + exceptions for shutdown and destruction
2015-09-17 09:15:59 +02:00
99687c68eb TODO list update
Items that had been forgotten and/or that were "obvious"
2015-09-17 09:10:24 +02:00
6d0753c7a8 Components registration - package scanning 2015-09-16 17:50:13 +02:00
0c23f613d6 Improved component naming
* Setting a component information record's name to null will lead to an
anonymous component, while setting it to an empty string will lead to an
component whose name is that of its class.
* New Anonymous annotation to indicate that a component is meant to be
anonymous (conflicts with ParametricComponent or valued Component
annotations).
2015-09-16 11:10:54 +02:00
36887ae759 Registry-aware components
The RegistryAware interface can be implemented in order to let the
component know of the registry it is being bound to.
2015-09-16 10:45:40 +02:00
f2cff8995b TODO list 2015-09-16 10:39:24 +02:00
1969094daa Component state - documentation
Also some minor refactoring.
2015-09-16 10:11:49 +02:00
e688bb366c Component state - tests 2015-09-16 09:38:53 +02:00
618204b8b1 Component state - Fixed various bugs in stop()
* Stopping only if inactive...
* Calling the wrong lifecycle action...
2015-09-16 09:38:25 +02:00
2fa4227e5a Component state - Code cleanup + method reordering 2015-09-15 17:05:21 +02:00
92ebf8dad2 Component state - Getters for dependencies and reverse dependencies 2015-09-15 17:00:18 +02:00
cced54a9fc Component state - Bad toString() method 2015-09-15 16:45:03 +02:00
53128c5e77 Components registry - Start, stop, restart 2015-09-15 16:07:53 +02:00
d083be2676 Components registry - Initialisation and destruction 2015-09-15 15:12:44 +02:00
d554f02ede Components registry - Component / component state query methods 2015-09-15 11:33:30 +02:00
59f28483dd Components registry - Component registration
* Incomplete class for component state tracking
* Incomplete components registry class
* Various exceptions for problems that can occur during component
registration
2015-09-15 11:21:26 +02:00
5dc745670b New component record - Unspecific dependency injector storage
Dependency injection functions are now stored as type-unspecific. This
makes them easier to use.
2015-09-15 09:40:46 +02:00
a932b90b7d Tests for the component registration record
Tests are mostly about the fromClass() method, which processes
annotations.
2015-09-14 11:23:22 +02:00
9f5fbcbf3d Component registration info - Rewrote dependency injector finder
Use the MemberFinder. Dependencies can be injected using methods.
2015-09-14 10:56:19 +02:00
a1ddf5f63a Dependency info - separate class validation method 2015-09-14 09:56:43 +02:00
a95d71e770 Component registration info - Lifecycle method finder rewritten
The method that looks for lifecycle methods now uses MemberFinder to
locate lifecycle methods in both interfaces and superclasses.
2015-09-14 09:34:39 +02:00
aa3ee13f66 Component registration info - getLifecycleAction() return type 2015-09-14 09:07:15 +02:00
d502d6f6b9 Component registration info - Parametric names vs annotations
A component that implements ParametricComponent may not have a name
specified using the Component annotation.
2015-09-14 08:54:16 +02:00
b13db82be2 Component registration info - Dependencies from all parents 2015-09-14 08:44:27 +02:00
f115bb7168 NewComponentInfo - Add dependency in setDriverFor 2015-09-13 16:09:13 +02:00
095ecca3dc NewComponentInfo - Fixed default constructor access 2015-09-13 16:00:44 +02:00
93e8c9a90e Started writing tests 2015-09-13 15:03:43 +02:00
e2de94eb7b Importing some code
* Various annotations
* New component information class
2015-09-13 14:46:11 +02:00
48466ed511 Created project 2015-09-13 14:39:54 +02:00