Examples of header()


Examples of org.apache.camel.component.mock.AssertionClause.header()

        resultEndpoint.expectedBodiesReceived(expectedBody);
        AssertionClause firstMessageExpectations = resultEndpoint.message(0);
        firstMessageExpectations.header("cheese").isEqualTo(123);
        firstMessageExpectations.header("JMSReplyTo").isEqualTo(replyQueue);
        firstMessageExpectations.header("JMSCorrelationID").isEqualTo(correlationID);
        firstMessageExpectations.header("JMSType").isEqualTo(messageType);

        template.sendBodyAndHeader("activemq:test.a", expectedBody, "cheese", 123);

        resultEndpoint.assertIsSatisfied();
View Full Code Here

Examples of org.apache.camel.component.mock.AssertionClause.header()

        resultEndpoint.expectedBodiesReceived(expectedBody);
        AssertionClause firstMessageExpectations = resultEndpoint.message(0);
        firstMessageExpectations.header("cheese").isEqualTo(123);
        firstMessageExpectations.header("JMSReplyTo").isEqualTo(replyQueue);
        firstMessageExpectations.header("JMSCorrelationID").isEqualTo(correlationID);
        firstMessageExpectations.header("JMSType").isEqualTo(messageType);

        template.sendBodyAndHeader("activemq:test.a", expectedBody, "cheese", 123);

        resultEndpoint.assertIsSatisfied();
View Full Code Here

Examples of org.apache.cxf.jaxrs.client.Client.header()

    public void testBookWithWebSocket() throws Exception {
        String address = "ws://localhost:" + getPort() + "/websocket";

        BookStoreWebSocket resource = JAXRSClientFactory.create(address, BookStoreWebSocket.class);
        Client client = WebClient.client(resource);
        client.header(HttpHeaders.USER_AGENT, JAXRSClientConduitWebSocketTest.class.getName());
       
        // call the GET service
        assertEquals("CXF in Action", new String(resource.getBookName()));

        // call the GET service in text mode
View Full Code Here

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

        URL busFile = JAXRSSamlTest.class.getResource("client.xml");
        Bus springBus = bf.createBus(busFile.toString());
        bean.setBus(springBus);

        WebClient wc = bean.createWebClient();
        wc.header("Authorization", "SAML invalid_grant");
        Response r = wc.get();
        assertEquals(401, r.getStatus());
    }
   
    @Test
View Full Code Here

Examples of org.apache.hadoop.oncrpc.RpcInfo.header()

  @Override
  public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
      throws Exception {

    RpcInfo info = (RpcInfo) e.getMessage();
    RpcCall rpcCall = (RpcCall) info.header();
    final int portmapProc = rpcCall.getProcedure();
    int xid = rpcCall.getXid();
    XDR in = new XDR(info.data().toByteBuffer().asReadOnlyBuffer(),
        XDR.State.READING);
    XDR out = new XDR();
View Full Code Here

Examples of org.apache.james.mailbox.store.MessageBuilder.header()

        cal2.set(8000, 2, 10);
        SimpleMailboxMembership m4 = new SimpleMailboxMembership(mailbox.getMailboxId(),3, 0, cal2.getTime(), 20, new Flags(Flag.DELETED), "My Otherbody2".getBytes(), headersTestSubject);
        index.add(null, mailbox, m4);
       
        MessageBuilder builder = new MessageBuilder();
        builder.header("From", "test <user-from@domain.org>");
        builder.header("To", FROM_ADDRESS);
        builder.header("Subject", "A " + SUBJECT_PART + " Multipart Mail");
        builder.header("Date", "Thu, 14 Feb 2008 12:00:00 +0000 (GMT)");
        builder.body = Charset.forName("us-ascii").encode(BODY).array();
        builder.uid = 10;
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.ODataResponse.ODataResponseBuilder.header()

    } catch (FactoryConfigurationError e) {
      throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass()
          .getSimpleName()), e);
    }
    builder.entity(csb.getInputStream());
    builder.header(ODataHttpHeaders.DATASERVICEVERSION, dataServiceVersion);
    return builder.build();
  }

  /**
   * Calculates the necessary data service version for the metadata serialization
View Full Code Here

Examples of org.apache.qpidity.nclient.Session.header()

        DeliveryProperties deliveryProps = new DeliveryProperties();
        MessageProperties msgProps = new MessageProperties();
        fillMessageHeaders(msgCtx,amqpTransportInfo,session,waitForResponse,deliveryProps,msgProps);

        synchronized(session){
            session.header(msgProps,deliveryProps);
            session.data(message);
            session.endData();
        }

        // if we are expecting a synchronous response back for the message sent out
View Full Code Here

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

        uri = uriBuilder.buildFromMap(pathParams);
        Resource resource = restClient.resource(uri);

        for (Map.Entry<String, Object> p : headerParams.entrySet()) {
            resource.header(p.getKey(), String.valueOf(p.getValue()));
        }

        for (Map.Entry<String, Object> p : cookieParams.entrySet()) {
            Cookie cookie = new Cookie(p.getKey(), String.valueOf(p.getValue()));
            resource.cookie(cookie);
View Full Code Here

Examples of org.atmosphere.cpr.AtmosphereRequest.header()

    @Test
    public void testSuspend() throws IOException, ServletException {

        AtmosphereRequest request = new AtmosphereRequest.Builder().pathInfo("/j").method("GET").build();
        request.header(X_ATMOSPHERE_TRANSPORT, LONG_POLLING_TRANSPORT);
        framework.doCometSupport(request, AtmosphereResponse.newInstance());
        assertNotNull(r.get());
    }

    public final static class I extends AtmosphereInterceptorAdapter {
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.