Examples of Poller


Examples of com.funambol.syncclient.blackberry.email.impl.Poller

            displayStatus(sdh.getLanguage("nothing-sync-enable"));
        }
       
        if (Configuration.enablePolling) {
           
            Poller poller = new Poller();
            poller.setSyncClientObj(this);
           
            pollerThread = new Thread(poller);
            pollerThread.start();
           
        }
View Full Code Here

Examples of com.github.restdriver.serverdriver.polling.Poller

        driver.addExpectation(new ClientDriverRequest("/"), new ClientDriverResponse("NOW!", "text/plain"));
    }
   
    @Test
    public void pollerReturnsSuccessEventually() {
        new Poller() {
            @Override
            public void poll() {
                loudly();
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
View Full Code Here

Examples of com.github.restdriver.serverdriver.polling.Poller

   
    @Test
    public void pollerTriesCorrectNumberOfTimes() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

Examples of com.github.restdriver.serverdriver.polling.Poller

   
    @Test
    public void pollerTriesCorrectNumberOfTimesWithDurationSpecified() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2), every(100, TimeUnit.MILLISECONDS)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

Examples of com.github.restdriver.serverdriver.polling.Poller

        driver.addExpectation(new ClientDriverRequest("/"), new ClientDriverResponse("NOW!", "text/plain"));
    }
   
    @Test
    public void pollerReturnsSuccessEventually() {
        new Poller() {
            @Override
            public void poll() {
                loudly();
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
View Full Code Here

Examples of com.github.restdriver.serverdriver.polling.Poller

   
    @Test
    public void pollerTriesCorrectNumberOfTimes() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

Examples of com.github.restdriver.serverdriver.polling.Poller

   
    @Test
    public void pollerTriesCorrectNumberOfTimesWithDurationSpecified() {
        expectedException.expect(ClientDriverFailedExpectationException.class);
       
        new Poller(times(2), every(100, TimeUnit.MILLISECONDS)) { // not enough times!
            @Override
            public void poll() {
                assertThat(get(baseUrl).asText(), is("NOW!"));
            }
        };
View Full Code Here

Examples of com.salas.bb.utils.poller.Poller

    /** Configures polling. */
    private void setupPolling()
    {
        ConnectionState connectionState = getConnectionState();
        poller = new Poller(connectionState);
    }
View Full Code Here

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

        ServerAdapter server = new ServerAdapter(wstServer.getServer());
        server.setAttribute(ISlingLaunchpadServer.PROP_INSTALL_LOCALLY, installBundleLocally);
        server.installModule(bundleProject);

        final RepositoryAccessor repo = new RepositoryAccessor(config);
        Poller poller = new Poller();
        poller.pollUntil(new Callable<Void>() {
            @Override
            public Void call() throws HttpException, IOException {
                repo.assertGetIsSuccessful("simple-servlet", "Version 1");
                return null;
            }
        }, nullValue(Void.class));

        // update DS component class
        InputStream simpleServlet2 = getClass().getResourceAsStream("SimpleServlet.java.v2.txt");
        project.createOrUpdateFile(Path.fromPortableString("src/example/SimpleServlet.java"), simpleServlet2);

        poller.pollUntil(new Callable<Void>() {
            @Override
            public Void call() throws HttpException, IOException {
                repo.assertGetIsSuccessful("simple-servlet", "Version 2");
                return null;
            }
View Full Code Here

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

        project.createOrUpdateFile(Path.fromPortableString("jcr_root/test/hello.txt"), new ByteArrayInputStream(
                "hello, world".getBytes()));

        // verify that file is created
        final RepositoryAccessor repo = new RepositoryAccessor(config);
        Poller poller = new Poller();
        poller.pollUntil(new Callable<Void>() {
            @Override
            public Void call() throws HttpException, IOException {
                repo.assertGetIsSuccessful("test/hello.txt", "hello, world");
                return null;
            }
        }, nullValue(Void.class));

        project.createOrUpdateFile(Path.fromPortableString("jcr_root/test/hello.txt"), new ByteArrayInputStream(
                "goodbye, world".getBytes()));

        // verify that file is updated
        poller.pollUntil(new Callable<Void>() {
            @Override
            public Void call() throws HttpException, IOException {
                repo.assertGetIsSuccessful("test/hello.txt", "goodbye, world");
                return null;
            }
        }, nullValue(Void.class));


        project.deleteMember(Path.fromPortableString("jcr_root/test/hello.txt"));

        // verify that file is deleted
        poller.pollUntil(new Callable<Void>() {
            @Override
            public Void call() throws HttpException, IOException {
                repo.assertGetReturns404("test/hello.txt");
                return null;
            }
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.