Package com.flux.tests

Source Code of com.flux.tests.FluxClient

package com.flux.tests;

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.representation.Form;

import java.util.Date;

/**
* Created with IntelliJ IDEA.
* User: arul
* Date: 5/28/12
* Time: 10:20 PM
* To change this template use File | Settings | File Templates.
*/
public class FluxClient {
    public static void main(String[] args) {
        Client client = Client.create();
        WebResource resource = client.resource("http://localhost:8080");
        Form form = new Form();
        form.add("namespace", "one shot job");
        form.add("schedule", "+5s");
        String name = resource.path("scheduler").post(String.class, form);
        System.out.println("Scheduled " + name + " at " + new Date());
    }
}
TOP

Related Classes of com.flux.tests.FluxClient

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.