Package org.apache.hivemind.internal

Examples of org.apache.hivemind.internal.ServicePoint


    private List getMatchingServiceIds(String serviceId)
    {
        final List possibleMatches = new LinkedList();
        for (Iterator i = _servicePoints.values().iterator(); i.hasNext();)
        {
            final ServicePoint servicePoint = (ServicePoint) i.next();
            if (servicePoint.getExtensionPointId().equals(
                    servicePoint.getModule().getModuleId() + "." + serviceId))
            {
                possibleMatches.add(servicePoint.getExtensionPointId());
            }
        }
        return possibleMatches;
    }
View Full Code Here


        return possibleMatches;
    }

    public Object getService(String serviceId, Class serviceInterface, Module module)
    {
        ServicePoint point = getServicePoint(serviceId, module);

        return point.getService(serviceInterface);
    }
View Full Code Here

        List servicePoints = (List) _servicePointsByInterfaceClassName.get(key);

        if (servicePoints == null)
            servicePoints = Collections.EMPTY_LIST;

        ServicePoint point = null;
        int count = 0;

        Iterator i = servicePoints.iterator();
        while (i.hasNext())
        {
            ServicePoint sp = (ServicePoint) i.next();

            if (!sp.visibleToModule(module))
                continue;

            point = sp;

            count++;
View Full Code Here

        int count = 0;

        Iterator i = servicePoints.iterator();
        while (i.hasNext())
        {
            ServicePoint point = (ServicePoint) i.next();

            if (point.visibleToModule(module))
                count++;
        }

        return count == 1;
    }
View Full Code Here

    public boolean containsService(String serviceId, Class serviceInterface, Module module)
    {
        checkShutdown();

        ServicePoint point = (ServicePoint) _servicePoints.get(serviceId);

        if (point == null)
            return false;

        return point.visibleToModule(module)
                && point.getServiceInterface().equals(serviceInterface);
    }
View Full Code Here

        checkShutdown();

        String serviceId = token.getServiceId();

        ServicePoint sp = (ServicePoint) _servicePoints.get(serviceId);

        return sp.getService(Object.class);
    }
View Full Code Here

        {
            return serviceIds;
        }
        for (Iterator i = _servicePoints.values().iterator(); i.hasNext();)
        {
            final ServicePoint servicePoint = (ServicePoint) i.next();

            if (serviceInterface.getName().equals( servicePoint.getServiceInterfaceClassName() )
                    && servicePoint.visibleToModule(null))
            {
                serviceIds.add(servicePoint.getExtensionPointId());
            }

        }
        return serviceIds;
    }
View Full Code Here

        while (i.hasNext())
        {
            if (following)
                buffer.append(", ");

            ServicePoint p = (ServicePoint) i.next();

            buffer.append(p.getExtensionPointId());

            following = true;
        }

        buffer.append("}");
View Full Code Here

        while (i.hasNext())
        {
            if (following)
                buffer.append(", ");

            ServicePoint p = (ServicePoint) i.next();

            buffer.append(p.getExtensionPointId());

            following = true;
        }

        buffer.append("}");
View Full Code Here

        RegistryInfrastructureConstructor ric = new RegistryInfrastructureConstructor(errorHandler,
                LogFactory.getLog(TestRegistryInfrastructureConstructor.class), null);

        RegistryInfrastructure registryInfrastructure = ric.constructRegistryInfrastructure(definition);

        ServicePoint sp = registryInfrastructure.getServicePoint("foo.bar.sp1", null);
        assertNotNull(sp);

        ConfigurationPoint cp = registryInfrastructure.getConfigurationPoint("zip.zoop.cp1", null);
        assertNotNull(cp);
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.internal.ServicePoint

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.