Package com.asakusafw.yaess.jobqueue.client

Examples of com.asakusafw.yaess.jobqueue.client.HttpJobClient


                        KEY_URL));
            }
            String user = resolve(profile, subconf, prefix, KEY_USER);
            String password = resolve(profile, subconf, prefix, KEY_PASSWORD);
            if (user == null || user.isEmpty()) {
                results.put(number, new HttpJobClient(url));
            } else {
                password = password == null ? "" : password;
                results.put(number, new HttpJobClient(url, user, password));
            }
        }
        return new ArrayList<JobClient>(results.values());
    }
View Full Code Here


        assertThat(profile.getPollingInterval(), is(JobClientProfile.DEFAULT_POLLING_INTERVAL));
        List<JobClient> clients = profile.getClients();
        assertThat(clients.size(), is(1));
        assertThat(clients.get(0), instanceOf(HttpJobClient.class));

        HttpJobClient c0 = (HttpJobClient) clients.get(0);
        assertThat(c0.getBaseUri(), is("http://www.example.com/jobqueue/"));
        assertThat(c0.getUser(), is(nullValue()));
    }
View Full Code Here

        List<JobClient> clients = profile.getClients();
        assertThat(clients.size(), is(2));
        assertThat(clients.get(0), instanceOf(HttpJobClient.class));
        assertThat(clients.get(1), instanceOf(HttpJobClient.class));

        HttpJobClient c0 = (HttpJobClient) clients.get(0);
        assertThat(c0.getBaseUri(), is("http://www.example.com/jobqueue/1/"));
        assertThat(c0.getUser(), is(nullValue()));

        HttpJobClient c1 = (HttpJobClient) clients.get(1);
        assertThat(c1.getBaseUri(), is("http://www.example.com/jobqueue/2/"));
        assertThat(c1.getUser(), is("u2"));
    }
View Full Code Here

        assertThat(profile.getPollingInterval(), is(567L));
        List<JobClient> clients = profile.getClients();
        assertThat(clients.size(), is(1));
        assertThat(clients.get(0), instanceOf(HttpJobClient.class));

        HttpJobClient c0 = (HttpJobClient) clients.get(0);
        assertThat(c0.getBaseUri(), is("http://www.example.com/jq/"));
        assertThat(c0.getUser(), is("u"));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.yaess.jobqueue.client.HttpJobClient

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.