@Documented @Retention(value=RUNTIME) @Target(value={TYPE,ANNOTATION_TYPE}) public @interface ApplicationService
The implementation of the annotated interface will be bound to this interface in SEED.
Usage :
@ApplicationService
public interface StockService {
public Availability checkAvailability(Product p);
}
The implementation should look like :
public class StockServiceBase implements StockService {
public Availability checkAvailability(Product p) {
...
}
}
And now the StockService implementation (StockServiceBase) will be available via :
@Inject StockService stockService;Verification will be done by the framework on either or not this service is in the right place.
Copyright © 2013-2015–2015. All rights reserved.