Package

eu

akkamo

Permalink

package akkamo

Visibility
  1. Public
  2. All

Type Members

  1. class AkkaModule extends Module with Initializable with Disposable

    Permalink

    Register one or more Actor System

    Register one or more Actor System

    configuration example:
    akkamo.akka = {
      // one block with akka configuration contains several aliases with the name name
      name1 = {
        aliases = ["alias1, "alias2"]
        // standard akka attributes for example:
       	akka{
       	  loglevel = "DEBUG"
         	debug {
         	  lifecycle = on
        	}
        }
       	// ....
      },
      name2 = { // not aliases - only one block allowed
        default = true
        ....
      }
    }

    In a case when more than one akka configuration exists, one must be denoted as default
    In case when missing configuration one default Akka system is created with name default.

  2. class Akkamo extends AnyRef

    Permalink
  3. class ConfigModule extends Module with Initializable

    Permalink

    Module providing application-wide configuration, using the Typesafe Config library.

    Module providing application-wide configuration, using the Typesafe Config library. For further details about configuration syntax and usage, please refer to Typesafe Config homepage: https://github.com/typesafehub/config.

  4. trait Context extends AnyRef

    Permalink

    Akkamo context represents the cornerstone of the Akkamo platform, as it is the place where different modules can register its own services provided for other modules (using one of registerIn methods) or can inject services already registered by other modules (using one of the inject method).

    Akkamo context represents the cornerstone of the Akkamo platform, as it is the place where different modules can register its own services provided for other modules (using one of registerIn methods) or can inject services already registered by other modules (using one of the inject method). Please note that the Context is immutable and any update performed (e.g. registering service) will yield new, updated instance.

  5. case class ContextError(message: String, cause: Throwable = null) extends Error with Product with Serializable

    Permalink

    Error thrown during failing operation on the Context (e.g.

    Error thrown during failing operation on the Context (e.g. attemp to register value into service, that has not been registered before).

    message

    detail message

    cause

    optional error cause

  6. trait Dependency extends AnyRef

    Permalink

    Represents single module dependency.

    Represents single module dependency. Provides convenient methods for chaining dependencies.

  7. trait Disposable extends AnyRef

    Permalink

    Trait indicating that the module extending this requires to perform additional actions before the Akkamo shutdown.

    Trait indicating that the module extending this requires to perform additional actions before the Akkamo shutdown. This is the very last stage of the Akkamo module lifecycle and in this stage, module should close all opened connection, files and get prepared for shutdown.

  8. case class DisposableError(message: String, cause: Throwable = null) extends Error with Product with Serializable

    Permalink

    Error to be thrown in case of serious unrecoverable error, occured during the dispose stage.

    Error to be thrown in case of serious unrecoverable error, occured during the dispose stage.

    message

    error message

    cause

    optional value of cause

  9. case class DisposeError(message: String, cause: Throwable = null) extends Error with Product with Serializable

    Permalink

    Error thrown when Akkamo dispose phase fails (e.g.

    Error thrown when Akkamo dispose phase fails (e.g. one of the disposed modules throws eu.akkamo.DisposableError).

    message

    detail message

    cause

    optional error cause

  10. trait Initializable extends AnyRef

    Permalink

    Trait indicating that the module extending this requires to perform initialization during Akkamo startup.

    Trait indicating that the module extending this requires to perform initialization during Akkamo startup. Initialization is the very first stage of Akkamo module lifecycle and in this stage, module should check all its required dependencies and/or register its own provided functionality into context.

  11. case class InitializableError(message: String, cause: Throwable = null) extends Error with Product with Serializable

    Permalink

    Recommended Error to be thrown inside eu.akkamo.Initializable#initialize method if serious unrecoverable problem occurs.

    Recommended Error to be thrown inside eu.akkamo.Initializable#initialize method if serious unrecoverable problem occurs.

    message

    error message

    cause

    optional value of cause

  12. case class InitializationError(message: String, cause: Throwable = null) extends Error with Product with Serializable

    Permalink

    Error thrown when Akkamo initialization fails (e.g.

    Error thrown when Akkamo initialization fails (e.g. one of the initialized modules throws eu.akkamo.InitializableError).

    message

    detail message

    cause

    optional error cause

  13. class LogModule extends Module with Initializable

    Permalink

    This module provides LoggingAdapterFactory via the Akkamo context, allowing to use the configured logging system outside Akka actors.

    This module provides LoggingAdapterFactory via the Akkamo context, allowing to use the configured logging system outside Akka actors.

    See also

    LoggingAdapterFactory

  14. trait LoggingAdapterFactory extends AnyRef

    Permalink

    Simple factory, providing LoggingAdapter instance for specified category (e.g.

    Simple factory, providing LoggingAdapter instance for specified category (e.g. module name, selected class). This factory is registered by the LogModule into the Akkamo context.

  15. trait Module extends AnyRef

    Permalink

    Trait representing the Akkamo module, i.e.

    Trait representing the Akkamo module, i.e. independent application unit, with possible dependencies on another modules, providing own functionality to other modules. The main goal is to allow writing applications as a set of modules, loosely coupled each other, allowing to easily add new functionality to existing application (or remove it), or to prepare several different application build profiles, with different functionality (modules) included.

    Each Akkamo module has its own lifecycle, with following stages: init stage (Initializable trait), run stage (Runnable trait) and dispose stage (Disposable trait). In order to execute desired module logic in selected stage, corresponding trait must be mixed in.

    See also

    Disposable

    Runnable

    Initializable

  16. trait Registry[T] extends AnyRef

    Permalink

    The Registry provides functionality to register a holder object to the Akkamo context, which value can be changed later.

    The Registry provides functionality to register a holder object to the Akkamo context, which value can be changed later. Note that this structure is immutable, hence the value replacement will yield new instance of Registry. The value is not intended to be changed directly, but using the registerIn method.

    For further clarification, let's introduce simple example. Let the RouteRegistry be fictional (see. akkamo AkkaHttp project for real example) implementation of Registry, representing the collection of all registered REST HTTP endpoints, allowing any other module to register own Route, representing particular HTTP route (e.g. GET /foo/bar).

    // register the custom RouteRegistry into the provided HttpRegistry
    ctx.registerIn[RouteRegistry, Route](instanceOfRoute)

    For more details about creating and registering custom registry, please refer the official Akkamo online documentation here: http://akkamo.eu

    T

    type of held value

  17. trait Res[T] extends AnyRef

    Permalink

    Represents the result holder of eu.akkamo.Initializable#initialize or eu.akkamo.Runnable#run operations.

    Represents the result holder of eu.akkamo.Initializable#initialize or eu.akkamo.Runnable#run operations. The actual operation result is held as an instance of Try[Context].

    T

    type of the result

  18. case class RunError(message: String, cause: Throwable = null) extends Error with Product with Serializable

    Permalink

    Error thrown when Akkamo run phase fails (e.g.

    Error thrown when Akkamo run phase fails (e.g. one of the ran modules throws eu.akkamo.RunnableError).

    message

    detail message

    cause

    optional error cause

  19. trait Runnable extends AnyRef

    Permalink

    Trait indicating that the module extending this requires to perform some actions after the initialization stage (i.e.

    Trait indicating that the module extending this requires to perform some actions after the initialization stage (i.e. in time when all modules are initialized).

  20. case class RunnableError(message: String, cause: Throwable = null) extends Error with Product with Serializable

    Permalink

    Recommended Error to be thrown inside eu.akkamo.Runnable#run method if serious unrecoverable problem occurs.

    Recommended Error to be thrown inside eu.akkamo.Runnable#run method if serious unrecoverable problem occurs.

    message

    error message

    cause

    optional value of cause

Value Members

  1. object Akkamo

    Permalink
  2. object Main extends App

    Permalink

  3. object config

    Permalink

    Object providing helper functions, data structures and implicit conversions to make the work with Java-based Typesafe Config in Scala world little more convenient.

    Object providing helper functions, data structures and implicit conversions to make the work with Java-based Typesafe Config in Scala world little more convenient.

    Example of use:

    import eu.akkamo.config._
    implicit val config: Config = someConfigInstanceHere
    
    val barValue: String = get[String]("barKey").getOrElse("unknown value")

Ungrouped