Package org.apache.tuscany.sca.implementation.osgi

Examples of org.apache.tuscany.sca.implementation.osgi.ServiceDescriptions


    private boolean deriveFromServiceDescriptions(OSGiImplementation impl, ModelResolver resolver)
        throws ContributionResolveException {
        // FIXME: How to find the RFC 119 service descriptions in the contribution and
        // derive the SCA component type from them?
        ServiceDescriptions descriptions = serviceDescriptionsFactory.createServiceDescriptions();
        descriptions = resolver.resolveModel(ServiceDescriptions.class, descriptions);
        if (descriptions != null && !descriptions.isEmpty()) {
            ComponentType ct = assemblyFactory.createComponentType();
            int index = 0;
            for (ServiceDescription ds : descriptions) {
                for (String i : ds.getInterfaces()) {
                    Class<?> cls = getJavaClass(resolver, i);
View Full Code Here


                throw new ServiceRuntimeException(e);
            }
        }
        for (URL url : descriptions) {
            try {
                ServiceDescriptions sds = deployer.loadXMLDocument(url, deployer.createMonitor());
                extender.remoteServiceDescriptions.add(sds);
            } catch (Exception e) {
                logger.log(Level.SEVERE, e.getMessage(), e);
                // throw new ServiceRuntimeException(e);
            }
View Full Code Here

    private boolean deriveFromServiceDescriptions(OSGiImplementation impl, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        // FIXME: How to find the RFC 119 service descriptions in the contribution and
        // derive the SCA component type from them?
        ServiceDescriptions descriptions = serviceDescriptionsFactory.createServiceDescriptions();
        descriptions = resolver.resolveModel(ServiceDescriptions.class, descriptions, context);
        if (descriptions != null && !descriptions.isEmpty()) {
            ComponentType ct = assemblyFactory.createComponentType();
            int index = 0;
            for (ServiceDescription ds : descriptions) {
                for (String i : ds.getInterfaces()) {
                    Class<?> cls = getJavaClass(resolver, i, context);
View Full Code Here

    }

    public ServiceDescriptions read(XMLStreamReader reader, ProcessorContext context) throws XMLStreamException,
        ContributionReadException {
        int event = reader.getEventType();
        ServiceDescriptions sds = null;
        ServiceDescription sd = null;
        String propertyName = null;
        String propertyType = "String";
        Object propertyValue = null;
        String propertyLiteral = null;
        boolean xml = false;
        boolean multiValued = false;
        while (true) {
            switch (event) {
                case XMLStreamConstants.START_ELEMENT:
                    QName name = reader.getName();
                    if (ServiceDescriptions.SERVICE_DESCRIPTIONS_QNAME.equals(name)) {
                        sds = factory.createServiceDescriptions();
                    } else if (ServiceDescriptions.SERVICE_DESCRIPTION_QNAME.equals(name)) {
                        sd = factory.createServiceDescription();
                        sds.add(sd);
                    } else if ("property".equals(name.getLocalPart())) {
                        multiValued = false;
                        propertyName = reader.getAttributeValue(null, "name");
                        propertyType = reader.getAttributeValue(null, "value-type");
                        if (propertyType == null) {
View Full Code Here

    private boolean deriveFromServiceDescriptions(OSGiImplementation impl, ModelResolver resolver)
        throws ContributionResolveException {
        // FIXME: How to find the RFC 119 service descriptions in the contribution and
        // derive the SCA component type from them?
        ServiceDescriptions descriptions = serviceDescriptionsFactory.createServiceDescriptions();
        descriptions = resolver.resolveModel(ServiceDescriptions.class, descriptions);
        if (descriptions != null && !descriptions.isEmpty()) {
            ComponentType ct = assemblyFactory.createComponentType();
            int index = 0;
            for (ServiceDescription ds : descriptions) {
                for (String i : ds.getInterfaces()) {
                    Class<?> cls = getJavaClass(resolver, i);
View Full Code Here

        this.factory = modelFactories.getFactory(ServiceDescriptionsFactory.class);
    }

    public ServiceDescriptions read(XMLStreamReader reader) throws XMLStreamException {
        int event = reader.getEventType();
        ServiceDescriptions sds = factory.createServiceDescriptions();
        ServiceDescription sd = null;
        while (true) {
            switch (event) {
                case XMLStreamConstants.START_ELEMENT:
                    QName name = reader.getName();
                    if (ServiceDescriptions.SERVICE_DESCRIPTION_QNAME.equals(name)) {
                        sd = factory.createServiceDescription();
                        sds.add(sd);
                    } else if ("provide".equals(name.getLocalPart())) {
                        String interfaceName = reader.getAttributeValue(null, "interface");
                        if (interfaceName != null) {
                            sd.getInterfaces().add(interfaceName);
                        }
View Full Code Here

    private boolean deriveFromServiceDescriptions(OSGiImplementation impl, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        // FIXME: How to find the RFC 119 service descriptions in the contribution and
        // derive the SCA component type from them?
        ServiceDescriptions descriptions = serviceDescriptionsFactory.createServiceDescriptions();
        descriptions = resolver.resolveModel(ServiceDescriptions.class, descriptions, context);
        if (descriptions != null && !descriptions.isEmpty()) {
            ComponentType ct = assemblyFactory.createComponentType();
            int index = 0;
            for (ServiceDescription ds : descriptions) {
                for (String i : ds.getInterfaces()) {
                    Class<?> cls = getJavaClass(resolver, i, context);
View Full Code Here

    private boolean deriveFromServiceDescriptions(OSGiImplementation impl, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        // FIXME: How to find the RFC 119 service descriptions in the contribution and
        // derive the SCA component type from them?
        ServiceDescriptions descriptions = serviceDescriptionsFactory.createServiceDescriptions();
        descriptions = resolver.resolveModel(ServiceDescriptions.class, descriptions, context);
        if (descriptions != null && !descriptions.isEmpty()) {
            ComponentType ct = assemblyFactory.createComponentType();
            int index = 0;
            for (ServiceDescription ds : descriptions) {
                for (String i : ds.getInterfaces()) {
                    Class<?> cls = getJavaClass(resolver, i, context);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.osgi.ServiceDescriptions

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.