Annotation Type OnService


  • @Target({FIELD,METHOD})
    @Retention(RUNTIME)
    public @interface OnService
    Annotate fields and methods that will be called when the corresponding services are available.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      long active
      How long shall the query be active?
      Boolean3 lazy
      todo: remove and replace by query.
      java.lang.String name
      The required service name that is used for searching the service.
      Boolean3 query
      Should be used as service query.
      Boolean3 required
      Fail at startup if no service is found?
      RequiredService requiredservice
      Define a required service inline.
    • Element Detail

      • query

        Boolean3 query
        Should be used as service query.
        Default:
        jadex.commons.Boolean3.NULL
      • required

        Boolean3 required
        Fail at startup if no service is found?
        Default:
        jadex.commons.Boolean3.NULL
      • lazy

        Boolean3 lazy
        todo: remove and replace by query. If is lazy the service search will happen on first call. This can go wrong if first call is a synchronous message. If lazy is false, the agent might block when search takes time.
        Default:
        jadex.commons.Boolean3.NULL
      • active

        long active
        How long shall the query be active?
        Default:
        -1L
      • name

        java.lang.String name
        The required service name that is used for searching the service.
        Default:
        ""
      • requiredservice

        RequiredService requiredservice
        Define a required service inline. If given no name it will receive the field name as name.
        Default:
        @jadex.micro.annotation.RequiredService(name="", type=java.lang.Object.class)