Package org.apache.tuscany.sca.monitor

Examples of org.apache.tuscany.sca.monitor.Monitor


            monitor.problem(problem);
        }       
    }

    public WebServiceBinding read(XMLStreamReader reader, ProcessorContext context) throws ContributionReadException, XMLStreamException {
        Monitor monitor = context.getMonitor();
        // Read a <binding.ws>
        WebServiceBinding wsBinding = wsFactory.createWebServiceBinding();
        /*ExtensionType bindingType = intentAttachPointTypeFactory.createBindingType();
        bindingType.setName(getArtifactType());
        bindingType.setUnresolved(true);
View Full Code Here


    public void resolve(WebServiceBinding model, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
       
      if (model == null || !model.isUnresolved())
        return;
      Monitor monitor = context.getMonitor()
      WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
        wsdlDefinition.setUnresolved(true);
        wsdlDefinition.setNamespace(model.getNamespace());
        wsdlDefinition.setNameOfBindingToResolve(model.getBindingName());
        wsdlDefinition.setNameOfServiceToResolve(model.getServiceName());
View Full Code Here

        if (contributions == null) {
            // Load contributions
            contributions = loadContributions(configuration, context);
        }
       
        Monitor monitor = context.getMonitor();
        Map<QName, List<String>> bindingBaseURIs = new HashMap<QName, List<String>>();
        for (BindingConfiguration config : configuration.getBindings()) {
            bindingBaseURIs.put(config.getBindingType(), config.getBaseURIs());
        }
        List<Contribution> allContributions = getAllContributions(configuration.getDomainURI());
View Full Code Here

        nodeFactory.init();
        nodeFactory.addNode(configuration, this);
        this.proxyFactory = nodeFactory.proxyFactory;

        try {
            Monitor monitor = nodeFactory.monitorFactory.createMonitor();
            ProcessorContext context = new ProcessorContext(monitor);

            // Set up the thead context monitor
            Monitor tcm = nodeFactory.monitorFactory.setContextMonitor(monitor);
            try {
                // Use the lack of the contributions collection as an indicator for when the node
                // is being started for the first time. If it is the first time do all the work
                // to read the contributions and create the domain composite
                if (contributions == null) {
View Full Code Here

        systemDefinitions = definitionsFactory.createDefinitions();

        DefinitionsExtensionPoint definitionsExtensionPoint =
            registry.getExtensionPoint(DefinitionsExtensionPoint.class);
       
        Monitor monitor = context.getMonitor();
        monitor.pushContext("Extension points definitions");
        try {
            for (Definitions defs : definitionsExtensionPoint.getDefinitions()) {
                DefinitionsUtil.aggregate(defs, systemDefinitions, monitor);
            }
        } finally {
            monitor.popContext();
        }

        // create a system contribution to hold the definitions. The contribution
        // will be extended later with definitions from application contributions
        systemContribution = contributionFactory.createContribution();
View Full Code Here

        init();
        return staxProcessor.read(reader, new ProcessorContext(monitor));
    }

    public Object loadXMLDocument(Reader document) throws XMLStreamException, ContributionReadException, ValidationException {
        Monitor monitor = createMonitor();
        Object model = loadXMLDocument(document, monitor);
        monitor.analyzeProblems();
        return model;
    }
View Full Code Here

        Map<QName, List<String>> bs = new HashMap<QName, List<String>>();
        if (endpointsIncludeDomainName) {
            bs.put(new QName("default"), Arrays.asList(new String[]{domainRegistry.getDomainName()}));
        }

        Monitor monitor = deployer.createMonitor();
        builtComposite = deployer.build(contributions, dependedOnContributions, bs, monitor);
        monitor.analyzeProblems();

        // TODO: Ideally deployer.build would set the name and uri to what this needs
        builtComposite.setName(composite.getName());
        builtComposite.setURI(composite.getURI());
        builtComposite.setContributionURI(composite.getContributionURI());
View Full Code Here

    }
   
    private JavaInterface resolveJavaInterface(JavaInterface javaInterface, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
       
        if (javaInterface != null && javaInterface.isUnresolved()) {
            Monitor monitor = context.getMonitor();
            // Resolve the Java interface
            javaInterface = resolver.resolveModel(JavaInterface.class, javaInterface, context);
            if (javaInterface.isUnresolved()) {

                // If the Java interface has never been resolved yet, do it now
View Full Code Here

    }

    public void resolve(JavaInterfaceContract javaInterfaceContract, ModelResolver resolver, ProcessorContext context)
        throws ContributionResolveException {
        try {
            Monitor monitor = context.getMonitor();
            // Resolve the interface and callback interface
            JavaInterface javaInterface =
                resolveJavaInterface((JavaInterface)javaInterfaceContract.getInterface(), resolver, context);
            javaInterfaceContract.setInterface(javaInterface);
View Full Code Here

        if (logger.isLoggable(quietLogging? Level.FINE : Level.INFO)) logger.log(quietLogging? Level.FINE : Level.INFO, "uninstallContribution: " + contributionURI);
    }
   
    protected void mergeContributionMetaData(String metaDataURL, Contribution contribution) throws ValidationException {
        ContributionMetadata metaData;
        Monitor monitor = deployer.createMonitor();
        try {
            metaData = deployer.loadXMLDocument(IOHelper.getLocationAsURL(metaDataURL), monitor);
        } catch (Exception e) {
            throw new ValidationException(e);
        }
        monitor.analyzeProblems();
        contribution.mergeMetaData(metaData);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.monitor.Monitor

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.