org.apache.ignite.resources

## Annotation Type ServiceContextResource

-     @Documented
       @Retention(value=RUNTIME)
       @Target(value={METHOD,FIELD})
      public @interface ServiceContextResource

  Annotates a field or a setter method for injecting a `service context` into a `service` instance.

  It is guaranteed that context will be injected before calling the `Service.init()` method.

  Here is how injection would typically happen:

       public class MyServiceImpl implements MyService {
            ...
            @ServiceContextResource
            private ServiceContext ctx;
            ...
       }

  or attach the same annotation to the method:

       public class MyServiceImpl implements MyService {
           ...
           private ServiceContext ctx;
           ...
           @ServiceContextResource
           public void setServiceContext(ServiceContext ctx) {
                this.ctx = ctx;
           }
           ...
       }

  See Also:
    `Service`, `ServiceContext`

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023