Examples of RestClient


Examples of org.codehaus.activesoap.RestClient

    public ActiveSOAPNotificationConsumer(RestClient client) {
        this.client = client;
    }

    public static ActiveSOAPNotificationConsumer newRestInstance(TransportClient transport) {
        RestClient client = XMLBeansHelper.createRestClient(transport);
        return new ActiveSOAPNotificationConsumer(client);
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.RestClient

    @Test
    public void testEmptyBulkWrite() throws Exception {
        TestSettings testSettings = new TestSettings("rest/emptybulk");
        testSettings.setProperty(ConfigurationOptions.ES_SERIALIZATION_WRITER_VALUE_CLASS, JdkValueWriter.class.getName());
        RestRepository restRepo = new RestRepository(testSettings);
        RestClient client = restRepo.getRestClient();
        client.bulk(new Resource(testSettings, false), new TrackingBytesArray(new BytesArray("{}")));
        restRepo.waitForYellow();
        restRepo.close();
        client.close();
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.RestClient

            return IOUtils.asString(execute(Request.Method.POST, index + "/_refresh", null).body());
        }
    }

    public static void putMapping(String index, byte[] content) throws Exception {
        RestClient rc = new ExtendedRestClient();
        BytesArray bs = new BytesArray(content);
        rc.putMapping(index, index + "/_mapping", bs.bytes());
        rc.close();
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.RestClient

    @BeforeClass
    public static void localStartup() throws Exception {
        AbstractPigTests.startup();

        // initialize Pig in local mode
        RestClient client = new RestClient(new TestSettings());
        try {
            client.deleteIndex("pig");
        } catch (Exception ex) {
            // ignore
        }
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.RestClient

    @BeforeClass
    public static void startup() throws Exception {
        AbstractPigTests.startup();
        // initialize Pig in local mode
        RestClient client = new RestClient(new TestSettings());
        try {
            client.deleteIndex("json-pig");
        } catch (Exception ex) {
            // ignore
        }
    }
View Full Code Here

Examples of org.jbehave.core.io.rest.RESTClient

    public IndexFromConfluence() {
        this(null, null);
    }

    public IndexFromConfluence(String username, String password) {
        this(new RESTClient(Type.XML, username, password));
    }
View Full Code Here

Examples of org.jbehave.core.io.rest.RESTClient

  public IndexFromXWiki(String username, String password) {
    this(username, password, new ToLowerCase());
  }

  public IndexFromXWiki(String username, String password, ResourceNameResolver nameResolver) {
    super(new RESTClient(Type.JSON, username, password), nameResolver);
  }
View Full Code Here

Examples of org.jbehave.core.io.rest.RESTClient

    public LoadFromConfluence() {
        this(null, null);
    }

    public LoadFromConfluence(String username, String password) {
        this(new RESTClient(Type.XML, username, password));
    }
View Full Code Here

Examples of org.jbehave.core.io.rest.RESTClient

    public IndexFromRedmine(String username, String password) {
        this(username, password, new ToLowerCase());
    }

    public IndexFromRedmine(String username, String password, ResourceNameResolver nameResolver) {
        super(new RESTClient(Type.JSON, username, password), nameResolver);
    }
View Full Code Here

Examples of org.jboss.seam.rest.client.RestClient

    /**
     * Producer method for proxied JAX-RS interfaces - REST Clients This method is not registered as a producer method by
     * default. It is registered by {@link RestClientExtension} only if there is an appropriate injection point.
     */
    public Object produceRestClient(InjectionPoint ip, ClientExecutor executor) {
        RestClient qualifier = AnnotationInspector.getAnnotation(ip.getAnnotated(), RestClient.class, manager);

        if (qualifier == null || !(ip.getType() instanceof Class<?>)) {
            // this should never happen
            throw new IllegalStateException("@RestClient injection point " + ip.getMember() + " is not valid.");
        }

        Class<?> clazz = (Class<?>) ip.getType();
        String url = interpolator.interpolate(qualifier.value());
        return ProxyFactory.create(clazz, url, executor);
    }
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.