A capsule represents something which is startable and stoppable.
Represents the tree structure which is formed by capsule scopes and their contained capsules.
Provides convenient onStart
and onStop
methods which the end user can use for ad-hoc adding
start and stop logic to the current scope.
Represents a collection of capsules which shall all be stopped on the same event.
A capsule scope implementation based on a scala.collection.Traversable.
A CapsuleContext implementation based on scala.util.DynamicVariable and DefaultCapsuleScope.
A class extending from DynamicCapsuleContext.
Contains a basic API and default implementation for building, using and extending a capsule-based DSL.
A capsule-based DSL is a generalization of the DSL used in the project "Domino". Here's an illustrative example how a capsuled-based DSL might look like:
// Somewhere in your code whenTurnedOn { whenDevicePluggedIn { lightLED() } }
The documentation distinguishes between 3 types of API clients: End users, capsule providers and context providers. The majority of developers will just come into contact with this API as end users.