Examples of post()


Examples of org.apache.accumulo.server.master.state.DeadServerList.post()

    for (TServerInstance dead : deleted) {
      String cause = I_DONT_KNOW_WHY;
      if (serversToShutdown.contains(dead))
        cause = "clean shutdown"; // maybe an incorrect assumption
      if (!getMasterGoalState().equals(MasterGoalState.CLEAN_STOP))
        obit.post(dead.hostPort(), cause);
    }
   
    Set<TServerInstance> unexpected = new HashSet<TServerInstance>(deleted);
    unexpected.removeAll(this.serversToShutdown);
    if (unexpected.size() > 0) {
View Full Code Here

Examples of org.apache.cxf.jaxrs.client.WebClient.post()

        WebClient wc = createWebClient(address, new SamlFormOutInterceptor(),
                                       formProvider, true);
       
        wc.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.APPLICATION_XML);
        try {
            Book book = wc.post(new Form().set("name", "CXF").set("id", 125),
                                Book.class);               
            assertEquals(125L, book.getId());
        } catch (WebApplicationException ex) {
            fail(ex.getMessage());
        } catch (ClientException ex) {
View Full Code Here

Examples of org.apache.tuscany.sca.binding.atom.collection.Collection.post()

    public void testServiceDocumentGet() throws Exception {
        Collection resourceCollection = testService.getCustomerCollection();
        Assert.assertNotNull(resourceCollection);

        Entry postEntry = postEntry("Sponge Bob");
        Entry newEntry = resourceCollection.post(postEntry);
        postEntry = postEntry("Austin Powers");
        newEntry = resourceCollection.post(postEntry);
        postEntry = postEntry("Count Dracula");
        newEntry = resourceCollection.post(postEntry);
View Full Code Here

Examples of org.apache.tuscany.sca.data.collection.ItemCollection.post()

            throw new ServiceRuntimeException(e);
        }
       
        // Dispatch the request to that host
        ItemCollection processCollection = processCollection(host);
        return processCollection.post(key, item);
    }

    public void put(String key, Item item) throws NotFoundException {
        throw new UnsupportedOperationException();
    }
View Full Code Here

Examples of org.apache.tuscany.sca.implementation.data.collection.ItemCollection.post()

            throw new ServiceRuntimeException(e);
        }
       
        // Dispatch the request to that host
        ItemCollection processCollection = processCollection(host);
        return processCollection.post(key, item);
    }

    public void put(String key, Item item) throws NotFoundException {
        throw new UnsupportedOperationException();
    }
View Full Code Here

Examples of org.apache.wicket.atmosphere.tester.AtmosphereTester.post()

    assertThat(updateTimeCalled.get(), is(false));
    assertThat(receiveMessageCalled.get(), is(false));

    Date payload = new Date();
    waTester.post(payload);

    assertThat(updateTimeCalled.get(), is(true));
    assertThat(receiveMessageCalled.get(), is(false));

    tester.assertContains(updateTimeIsExecuted);
View Full Code Here

Examples of org.apache.wink.client.Resource.post()

                .post(String.class, SENT_MESSAGE);
        assertEquals(RECEIVED_MESSAGE, response);
        assertEquals(SENT_MESSAGE, server.getRequestContentAsString());

        // do post with response
        ClientResponse clientResponse = resource.post(SENT_MESSAGE);
        assertEquals(RECEIVED_MESSAGE, clientResponse.getEntity(String.class));

        // test generic entity
        TestGenerics<String> tg = resource.post(new EntityType<TestGenerics<String>>() {
        }, SENT_MESSAGE);
View Full Code Here

Examples of org.asynchttpclient.SimpleAsyncHttpClient.post()

        SimpleAsyncHttpClient client = new SimpleAsyncHttpClient.Builder().setProviderClass(getProviderClass()).setRealmPrincipal(USER).setRealmPassword(ADMIN)
                .setUrl(getTargetUrl()).setHeader("Content-Type", "text/html").build();
        try {
            StringBuilder s = new StringBuilder();
            Future<Response> future = client.post(new InputStreamBodyGenerator(new ByteArrayInputStream(MY_MESSAGE.getBytes())), new AppendableBodyConsumer(s));

            Response response = future.get();
            assertEquals(response.getStatusCode(), 200);
            assertEquals(s.toString(), MY_MESSAGE);
            assertEquals(response.getStatusCode(), HttpServletResponse.SC_OK);
View Full Code Here

Examples of org.cfeclipse.cfml.net.ClientHttpRequest.post()

       
        String message = "";
        //Actually submit this...
        try {
          ClientHttpRequest request = new ClientHttpRequest(snipExServer);
          InputStream stream = request.post(postMap);
          String stringFromInputStream = ResourceUtils.getStringFromInputStream(stream);
          message = stringFromInputStream;
         
        } catch (IOException e) {
          e.printStackTrace();
View Full Code Here

Examples of org.cfeclipse.cfml.snippets.net.ClientHttpRequest.post()

       
        String message = "";
        //Actually submit this...
        try {
          ClientHttpRequest request = new ClientHttpRequest(snipExServer);
          InputStream stream = request.post(postMap);
          String stringFromInputStream = ResourceUtils.getStringFromInputStream(stream);
          message = stringFromInputStream;
         
        } catch (IOException e) {
          e.printStackTrace();
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.