Examples of Poller


Examples of org.apache.sling.ide.test.impl.helpers.Poller

        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                hasMixinTypes("mix:language"), hasChildrenCount(3));

        final RepositoryAccessor repo = new RepositoryAccessor(config);
        Poller poller = new Poller();
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.Poller

        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                hasMixinTypes("mix:language"), hasChildrenCount(3));

        final RepositoryAccessor repo = new RepositoryAccessor(config);
        Poller poller = new Poller();
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
        }, postConditions);

        // update .content.xml structure
        InputStream updatedContentXml = getClass().getResourceAsStream("content-nested-structure-deleted-node.xml");
        project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"), updatedContentXml);

        // poll until we only have 2 child nodes left
        postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                hasMixinTypes("mix:language"), hasChildrenCount(2));
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.Poller

        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                hasMixinTypes("mix:language"), hasChildrenCount(3));

        final RepositoryAccessor repo = new RepositoryAccessor(config);
        Poller poller = new Poller();
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
        }, postConditions);

        // update .content.xml structure
        InputStream updatedContentXml = getClass()
                .getResourceAsStream("content-nested-structure-deleted-all-nodes.xml");
        project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"), updatedContentXml);

        // poll until we only have no child nodes left
        postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                hasMixinTypes("mix:language"), hasChildrenCount(0));
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.Poller

        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                hasMixinTypes("mix:language"), hasChildrenNames("message", "error", "warning"));

        final RepositoryAccessor repo = new RepositoryAccessor(config);
        Poller poller = new Poller();
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
        }, postConditions);

        // update .content.xml structure
        InputStream updatedContentXml = getClass().getResourceAsStream("content-nested-structure-reordered-nodes.xml");
        project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"), updatedContentXml);

        // poll until we have the child nodes reordered
        postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:OrderedFolder"),
                hasMixinTypes("mix:language"), hasChildrenNames("message", "warning", "error"));

        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.Poller

        project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"), contentXml);

        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/en"), hasPrimaryType("sling:Folder"),
                hasMixinTypes("mix:language"), hasChildrenCount(3));

        Poller poller = new Poller();
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/en");

            }
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.Poller

        Matcher<Node> postConditions = allOf(hasPath("/content/test-root/" + baseName),
                hasPrimaryType("sling:OsgiConfig"));

        final RepositoryAccessor repo = new RepositoryAccessor(config);
        Poller poller = new Poller();
        poller.pollUntil(new Callable<Node>() {
            @Override
            public Node call() throws RepositoryException {
                return repo.getNode("/content/test-root/" + baseName);

            }
        }, postConditions);

        // Remove file from disk
        project.deleteMember(Path.fromPortableString("jcr_root/content/test-root/" + baseName + ".xml"));

        // poll until the node no longer exists
        poller.pollUntil(new Callable<Boolean>() {
            @Override
            public Boolean call() throws RepositoryException {
                return repo.hasNode("/content/test-root/" + baseName);

            }
View Full Code Here

Examples of org.apache.sling.ide.test.impl.helpers.Poller

        OsgiBundleManifest mf = new OsgiBundleManifest("com.example.bundle001").version("1.0.0").serviceComponent(
                serviceComponentHeader);

        project.createOsgiBundleManifest(mf);

        poller = new Poller();
        poller.pollUntil(new Callable<IProject>() {

            @Override
            public IProject call() throws Exception {
                return projectRule.getProject();
View Full Code Here

Examples of org.apache.tomcat.util.net.AprEndpoint.Poller

                            socket.getSocket().longValue(),
                            SocketStatus.STOP);
                }
            } else {
                // Upgraded
                Poller p = ((AprEndpoint) proto.endpoint).getPoller();
                if (p == null) {
                    // Connector has been stopped
                    release(socket, processor, true, false);
                } else {
                    p.add(socket.getSocket().longValue(), -1, true, false);
                }
            }
        }
View Full Code Here

Examples of org.apache.tomcat.util.net.AprEndpoint.Poller

                            socket.getSocket().longValue(),
                            SocketStatus.STOP);
                }
            } else if (processor.isUpgrade()) {
                // Upgraded
                Poller p = ((AprEndpoint) proto.endpoint).getPoller();
                if (p == null) {
                    // Connector has been stopped
                    release(socket, processor, true, false);
                } else {
                    p.add(socket.getSocket().longValue(), -1, true, false);
                }
            } else {
                // Tomcat 7 proprietary upgrade
                ((AprEndpoint) proto.endpoint).getPoller().add(
                        socket.getSocket().longValue(),
View Full Code Here

Examples of org.apache.tomcat.util.net.AprEndpoint.Poller

                            socket.getSocket().longValue(),
                            SocketStatus.STOP);
                }
            } else {
                // Upgraded
                Poller p = ((AprEndpoint) proto.endpoint).getPoller();
                if (p == null) {
                    // Connector has been stopped
                    release(socket, processor, true, false);
                } else {
                    p.add(socket.getSocket().longValue(), -1, true, false);
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.