Search in sources :

Example 1 with ComponentServiceObjects

use of org.osgi.service.component.ComponentServiceObjects in project felix by apache.

the class ComponentServiceObjectsHelper method getServiceObjects.

public ComponentServiceObjects getServiceObjects(final ServiceReference<?> ref) {
    ComponentServiceObjectsImpl cso = this.services.get(ref);
    if (cso == null) {
        final ServiceObjects serviceObjects = this.bundleContext.getServiceObjects(ref);
        if (serviceObjects != null) {
            cso = new ComponentServiceObjectsImpl(serviceObjects);
            final ComponentServiceObjectsImpl oldCSO = this.services.putIfAbsent(ref, cso);
            if (oldCSO != null) {
                cso = oldCSO;
            }
        }
    }
    return cso;
}
Also used : ComponentServiceObjects(org.osgi.service.component.ComponentServiceObjects) ServiceObjects(org.osgi.framework.ServiceObjects)

Aggregations

ServiceObjects (org.osgi.framework.ServiceObjects)1 ComponentServiceObjects (org.osgi.service.component.ComponentServiceObjects)1