Package org.apache.felix.ipojo.util

Examples of org.apache.felix.ipojo.util.Tracker


        m_onDeparture = new Callback(unbind, new Class[] {ServiceReference.class}, false, m_handler.getInstanceManager());
        if (modification != null) {
            m_onModification = new Callback(modification, new Class[] {ServiceReference.class}, false, m_handler.getInstanceManager());
        }
        m_filter = filter;
        m_tracker = new Tracker(handler.getInstanceManager().getContext(), m_filter, this);
    }
View Full Code Here


         */
        public SourceTracker(String name, BundleContext countext) throws ConfigurationException {
            String fil = "(&(" + Constants.OBJECTCLASS + "=" + ContextSource.class.getName() + ")(" + SOURCE_NAME + "=" + name + "))";
            try {
                Filter filter = countext.createFilter(fil);
                m_tracker = new Tracker(countext, filter, this);
            } catch (InvalidSyntaxException e) {
                throw new ConfigurationException("A Context source filter is invalid " + fil, e);
            }
        }
View Full Code Here

    /**
     * Start the registry management.
     */
    public void start() {
        m_tracker = new Tracker(m_global, Factory.class.getName(), this);
        m_tracker.open();
    }
View Full Code Here

            try {
                String filter = "(&(" + Constants.OBJECTCLASS + "=" + HandlerFactory.class.getName() + ")"
                    + "(" + Handler.HANDLER_TYPE_PROPERTY + "=" + CompositeHandler.HANDLER_TYPE + ")"
                    + "(factory.state=1)"
                    + ")";
                m_tracker = new Tracker(m_context, m_context.createFilter(filter), this);
                m_tracker.open();
            } catch (InvalidSyntaxException e) {
                m_logger.log(Logger.ERROR, "A factory filter is not valid: " + e.getMessage());
                stop();
            }
View Full Code Here

    public void starting() {
        if (m_tracker == null) {
            if (m_requiredHandlers.size() != 0) {
                try {
                    String filter = "(&(" + Handler.HANDLER_TYPE_PROPERTY + "=" + PrimitiveHandler.HANDLER_TYPE + ")" + "(factory.state=1)" + ")";
                    m_tracker = new Tracker(m_context, m_context.createFilter(filter), this);
                    m_tracker.open();
                } catch (InvalidSyntaxException e) {
                    m_logger.log(Logger.ERROR, "A factory filter is not valid: " + e.getMessage()); //Holding the lock should not be an issue here.
                    stop();
                }
View Full Code Here

    /**
     * Start the registry management.
     */
    public void start() {
        m_tracker = new Tracker(m_global, Factory.class.getName(), this);
        m_tracker.open();
    }
View Full Code Here

         */
        public SourceTracker(String name, BundleContext countext) throws ConfigurationException {
            String fil = "(&(" + Constants.OBJECTCLASS + "=" + ContextSource.class.getName() + ")(" + SOURCE_NAME + "=" + name + "))";
            try {
                Filter filter = countext.createFilter(fil);
                m_tracker = new Tracker(countext, filter, this);
            } catch (InvalidSyntaxException e) {
                throw new ConfigurationException("A Context source filter is invalid " + fil + " : " + e.getMessage());
            }
        }
View Full Code Here

            try {
                String filter = "(&(" + Constants.OBJECTCLASS + "=" + HandlerFactory.class.getName() + ")"
                    + "(" + Handler.HANDLER_TYPE_PROPERTY + "=" + CompositeHandler.HANDLER_TYPE + ")"
                    + "(factory.state=1)"
                    + ")";
                m_tracker = new Tracker(m_context, m_context.createFilter(filter), this);
                m_tracker.open();
            } catch (InvalidSyntaxException e) {
                m_logger.log(Logger.ERROR, "A factory filter is not valid: " + e.getMessage());
                stop();
                return;
View Full Code Here

            return; // Already started
        } else {
            if (m_requiredHandlers.size() != 0) {
                try {
                    String filter = "(&(" + Handler.HANDLER_TYPE_PROPERTY + "=" + PrimitiveHandler.HANDLER_TYPE + ")" + "(factory.state=1)" + ")";
                    m_tracker = new Tracker(m_context, m_context.createFilter(filter), this);
                    m_tracker.open();
                } catch (InvalidSyntaxException e) {
                    m_logger.log(Logger.ERROR, "A factory filter is not valid: " + e.getMessage()); //Holding the lock should not be an issue here.
                    stop();
                }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.util.Tracker

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.