Package com.volantis.osgi.cm

Examples of com.volantis.osgi.cm.ServiceHandler


        // Create a filter that will only select those services that are of the
        // same type as we care about.
        StringBuffer buffer = new StringBuffer();
        buffer.append("(|");
        for (int i = 0; i < serviceHandlers.length; i++) {
            ServiceHandler serviceHandler = serviceHandlers[i];
            String registeredClass = serviceHandler.getRegisteredClass();
            buffer.append("(objectClass=").append(registeredClass).append(")");
        }
        buffer.append(")");

        Filter filter;
View Full Code Here


                String registeredClass = registeredClasses[i];

                // Determine if the service that was registered is one of the
                // special ones that we care about. If not ignore it and carry on.
                for (int j = 0; j < serviceHandlers.length; j++) {
                    ServiceHandler handler = serviceHandlers[j];
                    if (registeredClass
                            .equals(handler.getRegisteredClass())) {
                        return handler;
                    }
                }
            }
View Full Code Here

            return null;
        }

        // Javadoc inherited.
        public Object addingService(ServiceReference reference) {
            ServiceHandler handler = getServiceHandler(reference);
            if (handler == null) {
                // Not one that we wanted, probably an error somewhere but
                // just ignore it.
                return null;
            }

            handler.serviceRegistered(reference);

            // Increment the use count on the service so that it doesn't go
            // away. Otherwise, delayed declarative services components
            // could be deactivated.
            bundleContext.getService(reference);
View Full Code Here

        // Javadoc inherited.
        public void modifiedService(
                ServiceReference reference, Object service) {

            ServiceHandler handler = (ServiceHandler) service;

            handler.serviceModified(reference);
        }
View Full Code Here

        // Javadoc inherited.
        public void removedService(
                ServiceReference reference, Object service) {

            ServiceHandler handler = (ServiceHandler) service;

            handler.serviceUnregistering(reference);

            // Decrement the use count on the service as we are not interested
            // in it anymore.
            bundleContext.ungetService(reference);
        }
View Full Code Here

TOP

Related Classes of com.volantis.osgi.cm.ServiceHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.