.setAspect(serviceInterface, serviceFilter, ranking) .setAspectCallbackInstance(callbackInstance) .setAspectCallbacks(add, change, remove, swap);
/** * Creates a new aspect. The aspect will be applied to any service that * matches the specified interface and filter. For each matching service * an aspect will be created based on the aspect implementation class. * The aspect will be registered with the same interface and properties * as the original service, plus any extra properties you supply here. * It will also inherit all dependencies, and if you declare the original * service as a member it will be injected. * * <p>Usage example: * * <blockquote><pre> * manager.createAspectService(ExistingService.class, "(foo=bar)", 10, "m_service") * .setImplementation(ExistingServiceAspect.class) * ); * </pre></blockquote> * * @param serviceInterface the service interface to apply the aspect to * @param serviceFilter the filter condition to use with the service interface * @param ranking the level used to organize the aspect chain ordering * @param autoConfig the aspect implementation field name where to inject original service. * If null, any field matching the original service will be injected. * @return a service that acts as a factory for generating aspects * @deprecated use {@link DependencyManager#createAspectComponent()} */ public Component createAspectService(Class<?> serviceInterface, String serviceFilter, int ranking, String autoConfig) { return createAspectComponent() .setAspect(serviceInterface, serviceFilter, ranking) .setAspectField(autoConfig); }
.setAspect(serviceInterface, serviceFilter, ranking) .setAspectCallbacks(add, change, remove, null);
.setAspect(serviceInterface, serviceFilter, ranking) .setAspectField(field) .setServiceProperties(aspectProperties);
/** * Creates a new aspect. The aspect will be applied to any service that * matches the specified interface and filter. For each matching service * an aspect will be created based on the aspect implementation class. * The aspect will be registered with the same interface and properties * as the original service, plus any extra properties you supply here. * It will also inherit all dependencies, and if you declare the original * service as a member it will be injected. * * <p>Usage example: * * <blockquote><pre> * manager.createAspectService(ExistingService.class, "(foo=bar)", 10) * .setImplementation(ExistingServiceAspect.class) * ); * </pre></blockquote> * * @param serviceInterface the service interface to apply the aspect to * @param serviceFilter the filter condition to use with the service interface * @param ranking the level used to organize the aspect chain ordering * @return a service that acts as a factory for generating aspects * @deprecated use {@link DependencyManager#createAspectComponent()} */ public Component createAspectService(Class<?> serviceInterface, String serviceFilter, int ranking) { return createAspectComponent() .setAspect(serviceInterface, serviceFilter, ranking); }
.setAspect(serviceInterface, serviceFilter, ranking) .setAspectCallbacks(add, change, remove, swap);