Package org.apache.felix.scr

Examples of org.apache.felix.scr.ScrService


            request.setAttribute(WebConsolePlugin.this.getClass().getName(), this);
        }

        protected Component getComponentId(final String componentIdPar)
        {
            final ScrService scrService = getScrService();
            if (scrService != null)
            {
                try
                {
                    final long componentId = Long.parseLong(componentIdPar);
                    return scrService.getComponent(componentId);
                }
                catch (NumberFormatException nfe)
                {
                    // don't care
                }
View Full Code Here


        protected Component getComponentByName(final String names)
        {
            if (names.length() > 0)
            {
                final ScrService scrService = getScrService();
                if (scrService != null)
                {

                    final int slash = names.lastIndexOf('/');
                    final String componentName;
                    final String pid;
                    if (slash > 0)
                    {
                        componentName = names.substring(0, slash);
                        pid = names.substring(slash + 1);
                    }
                    else
                    {
                        componentName = names;
                        pid = null;
                    }

                    Component[] components;
                    try
                    {
                        components = scrService.getComponents(componentName);
                    }
                    catch (Throwable t)
                    {
                        // not implemented in the used API version
                        components = null;
View Full Code Here

        final JSONWriter jw = new JSONWriter(pw);
        try
        {
            jw.object();

            final ScrService scrService = getScrService();
            if (scrService == null)
            {
                jw.key("status"); //$NON-NLS-1$
                jw.value(-1);
            }
            else
            {
                final Component[] components = scrService.getComponents();

                if (components == null || components.length == 0)
                {
                    jw.key("status"); //$NON-NLS-1$
                    jw.value(0);
View Full Code Here

    }


    protected Component[] findComponentsByName( String name )
    {
        ScrService scr = ( ScrService ) scrTracker.getService();
        if ( scr != null )
        {
            return scr.getComponents( name );
        }

        return null;
    }
View Full Code Here

    }


    protected Component[] getComponents()
    {
        ScrService scr = ( ScrService ) scrTracker.getService();
        if ( scr != null )
        {
            return scr.getComponents();
        }

        return null;
    }
View Full Code Here

        final JSONWriter jw = new JSONWriter(pw);
        try
        {
            jw.object();

            final ScrService scrService = getScrService();
            if (scrService == null)
            {
                jw.key("status"); //$NON-NLS-1$
                jw.value(-1);
            }
            else
            {
                final Component[] components = scrService.getComponents();

                if (components == null || components.length == 0)
                {
                    jw.key("status"); //$NON-NLS-1$
                    jw.value(0);
View Full Code Here

            request.setAttribute(WebConsolePlugin.this.getClass().getName(), this);
        }

        protected Component getComponentId(final String componentIdPar)
        {
            final ScrService scrService = getScrService();
            if (scrService != null)
            {
                try
                {
                    final long componentId = Long.parseLong(componentIdPar);
                    return scrService.getComponent(componentId);
                }
                catch (NumberFormatException nfe)
                {
                    // don't care
                }
View Full Code Here

        protected Component getComponentByName(final String names)
        {
            if (names.length() > 0)
            {
                final ScrService scrService = getScrService();
                if (scrService != null)
                {

                    final int slash = names.lastIndexOf('/');
                    final String componentName;
                    final String pid;
                    if (slash > 0)
                    {
                        componentName = names.substring(0, slash);
                        pid = names.substring(slash + 1);
                    }
                    else
                    {
                        componentName = names;
                        pid = null;
                    }

                    Component[] components;
                    try
                    {
                        components = scrService.getComponents(componentName);
                    }
                    catch (Throwable t)
                    {
                        // not implemented in the used API version
                        components = null;
View Full Code Here

TOP

Related Classes of org.apache.felix.scr.ScrService

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.