Annotation Type Start


  • @Target(METHOD)
    @Retention(RUNTIME)
    public @interface Start
    Annotation indicating this method should be called when the application starts up.

    If nothing else depends on this bean, then this bean will only work if the bean is explicitly bound.

    Note: If this bean is provided by an @Provided method, then that method *must* be annotated with @Singleton, otherwise it won't be detected.

    Author:
    James Roper
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int order
      The order in which it should be started, higher meaning later.
    • Element Detail

      • order

        int order
        The order in which it should be started, higher meaning later. While apps are free to use any ordering system they wish, the following convention is recommended:

        10 - Services that connect to resources and do not depend on other services, for example, database connections 20-80 - Services that depend on resources, but don't actually start the app doing its core functions 90 - Services that start the app doing its core functions, for example, listen on queues, listen for HTTP, start scheduled services

        Returns:
        The order, the least being started first, the greatest being started last
        Default:
        50