Examples of addHeader()


Examples of org.fusesource.ide.launcher.debug.model.values.CamelHeadersValue.addHeader()

   */
  public void addHeader(String key, String value) {
    try {
      if (getValue() instanceof CamelHeadersValue) {
        CamelHeadersValue val = (CamelHeadersValue)getValue();
        val.addHeader(key, value);
      }
    } catch (DebugException ex) {
      Activator.getLogger().error(ex);
    } finally {
      fireCreationEvent();
View Full Code Here

Examples of org.fusesource.ide.launcher.debug.model.variables.CamelHeadersVariable.addHeader()

      CamelHeadersVariable var = (CamelHeadersVariable)o;
      NewMessageHeaderDialog dlg = new NewMessageHeaderDialog(HandlerUtil.getActiveShell(event));
      if (Window.OK == dlg.open()) {
        String key = dlg.getHeaderKey();
        String val = dlg.getHeaderValue();
        var.addHeader(key, val);
      }     
    }
    return null;
  }
 
View Full Code Here

Examples of org.fusesource.stomp.codec.StompFrame.addHeader()

    public void testProduce() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection subscribeConnection = stomp.connectBlocking();

        StompFrame frame = new StompFrame(SUBSCRIBE);
        frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
        frame.addHeader(ID, subscribeConnection.nextId());
        StompFrame response = subscribeConnection.request(frame);

        final CountDownLatch latch = new CountDownLatch(numberOfMessages);
View Full Code Here

Examples of org.gatein.pc.test.unit.protocol.response.InvokeGetResponse.addHeader()

      seq.bindAction(0, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
      {
         protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
         {
            InvokeGetResponse resource = new InvokeGetResponse(response.createResourceURL().toString());
            resource.addHeader("myheader", "render-value");
            return resource;
         }
      });

      seq.bindAction(1, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
View Full Code Here

Examples of org.glassfish.admin.rest.model.SseResponseBody.addHeader()

        EventOutput eo = executeSseCommand(getSubject(), invoker.getCommand(), invoker.getParams(), new ResponseBodyBuilderImpl() {
            @Override
            protected ResponseBody success(ActionReport report) {
                invoker.setResult(report.getExtraProperties());
                SseResponseBody responseBody = new SseResponseBody();
                responseBody.addHeader("Location", collectionUri + "/id/" + invoker.getNewItemName())
                        .addSuccess(invoker.getSuccessMessage());
                return responseBody;
            }
            @Override
            protected boolean includeResourceLinks() {
View Full Code Here

Examples of org.glassfish.grizzly.http.HttpHeader.addHeader()

            final HttpHeader httpHeader = httpContent.getHttpHeader();
           
            final MimeHeaders trailerHeaders = httpTrailer.getHeaders();
            final int size = trailerHeaders.size();
            for (int i = 0; i < size; i++) {
                httpHeader.addHeader(
                        trailerHeaders.getName(i).toString(),
                        trailerHeaders.getValue(i).toString());
            }
        }
    }   
View Full Code Here

Examples of org.glassfish.grizzly.http.HttpResponsePacket.addHeader()

            final HttpRequestPacket request = (HttpRequestPacket) httpHeader;
            final HttpResponsePacket response = request.getResponse();
           
            // Set response "Server" header
            if (serverVersion != null && !serverVersion.isEmpty()) {
                response.addHeader(Header.Server, serverVersion);
            }
           
            // Set response "X-Powered-By" header
            if (xPoweredBy != null) {
                response.addHeader(Header.XPoweredBy, xPoweredBy);
View Full Code Here

Examples of org.hornetq.core.protocol.stomp.StompFrame.addHeader()

         response = new StompFrameV10(Stomp.Responses.CONNECTED);

         if (frame.hasHeader(Stomp.Headers.ACCEPT_VERSION))
         {
            response.addHeader(Stomp.Headers.Connected.VERSION, "1.0");
         }

         response.addHeader(Stomp.Headers.Connected.SESSION, connection.getID().toString());

         if (requestID != null)
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.DefaultHttpChunkTrailer.addHeader()

                    String[] header = splitHeader(line);
                    String name = header[0];
                    if (!name.equalsIgnoreCase(HttpHeaders.Names.CONTENT_LENGTH) &&
                        !name.equalsIgnoreCase(HttpHeaders.Names.TRANSFER_ENCODING) &&
                        !name.equalsIgnoreCase(HttpHeaders.Names.TRAILER)) {
                        trailer.addHeader(name, header[1]);
                    }
                    lastHeader = name;
                }

                line = readHeader(buffer);
View Full Code Here

Examples of org.jboss.netty.handler.codec.http.DefaultHttpRequest.addHeader()

        String path = url.getPath();
        if (url.getQuery() != null && url.getQuery().length() > 0) {
            path = url.getPath() + "?" + url.getQuery();
        }
        HttpRequest request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, path);
        request.addHeader(Names.UPGRADE, Values.WEBSOCKET);
        request.addHeader(Names.CONNECTION, Values.UPGRADE);
        request.addHeader(Names.HOST, url.getHost());
        request.addHeader(Names.ORIGIN, "http://" + url.getHost());

        e.getChannel().write(request);
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.