congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.jboss.netty.handler.codec.http
Code IndexAdd Tabnine to your IDE (free)

How to use org.jboss.netty.handler.codec.http

Best Java code snippets using org.jboss.netty.handler.codec.http (Showing top 20 results out of 639)

origin: apache/incubator-druid

 @Override
 public List<String> apply(String input)
 {
  return headers.getAll(input);
 }
}));
origin: io.netty/netty

/**
 * Sets the {@code "Date"} header.
 */
public static void setDate(HttpMessage message, Date value) {
  if (value != null) {
    message.headers().set(Names.DATE, HttpHeaderDateFormat.get().format(value));
  } else {
    message.headers().set(Names.DATE, null);
  }
}
origin: io.netty/netty

private void resetState() {
  if (!isDecodingRequest()) {
    HttpResponse res = (HttpResponse) message;
    if (res != null && res.getStatus().getCode() == 101) {
      checkpoint(State.UPGRADED);
      return;
    }
  }
  checkpoint(State.SKIP_CONTROL_CHARS);
}
origin: apache/incubator-druid

 @Override
 public ClientResponse<InputStream> handleResponse(HttpResponse response, TrafficCop trafficCop)
 {
  returnCode.set(response.getStatus().getCode());
  reasonString.set(response.getStatus().getReasonPhrase());
  return super.handleResponse(response, trafficCop);
 }
};
origin: io.netty/netty

@Override
protected HttpMessage createMessage(String[] initialLine) throws Exception {
  return new DefaultHttpRequest(
      HttpVersion.valueOf(initialLine[2]), HttpMethod.valueOf(initialLine[0]), initialLine[1]);
}
origin: apache/incubator-druid

protected boolean isSuccess(FullResponseHolder responseHolder)
{
 return responseHolder.getStatus().getCode() / 100 == 2;
}
origin: apache/incubator-druid

 @Override
 public ChannelPipeline getPipeline()
 {
  ChannelPipeline pipeline = new DefaultChannelPipeline();

  pipeline.addLast("codec", new HttpClientCodec());
  pipeline.addLast("inflater", new HttpContentDecompressor());

  return pipeline;
 }
}
origin: io.netty/netty

/**
 * Adds a new header with the specified name and value.
 * If the specified value is not a {@link String}, it is converted into a
 * {@link String} by {@link Object#toString()}, except for {@link Date}
 * and {@link Calendar} which are formatted to the date format defined in
 * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1">RFC2616</a>.
 */
public static void addHeader(HttpMessage message, String name, Object value) {
  message.headers().add(name, value);
}
origin: io.netty/netty

/**
 * Sets the {@code "Host"} header.
 */
public static void setHost(HttpMessage message, String value) {
  message.headers().set(Names.HOST, value);
}
origin: io.netty/netty

/**
 * Returns the value of the {@code "X-SPDY-Scheme"} header.
 */
public static String getScheme(HttpMessage message) {
  return message.headers().get(Names.SCHEME);
}
origin: voldemort/voldemort

public boolean hasGetVersionRequestHeader() {
  boolean result = false;
  String headerValue = this.request.getHeader(RestMessageHeaders.X_VOLD_GET_VERSION);
  if(headerValue != null) {
    result = true;
  }
  return result;
}
origin: io.netty/netty

/**
 * Removes the {@code "X-SPDY-Priority"} header.
 */
public static void removePriority(HttpMessage message) {
  message.headers().remove(Names.PRIORITY);
}
origin: io.netty/netty

private Object reset() {
  HttpMessage message = this.message;
  ChannelBuffer content = this.content;
  if (content != null) {
    message.setContent(content);
    this.content = null;
  }
  resetState();
  this.message = null;
  return message;
}
origin: io.netty/netty

@Override
public HttpHeaders add(String name, Object value) {
  if (validate) {
    validateName(name);
  }
  return super.add(name, value);
}
origin: io.netty/netty

@Override
public HttpHeaders set(String name, Object value) {
  if (validate) {
    validateName(name);
  }
  return super.set(name, value);
}
origin: apache/incubator-druid

@Override
public ClientResponse<AppendableByteArrayInputStream> handleResponse(HttpResponse response, TrafficCop trafficCop)
{
 status = response.getStatus().getCode();
 description = response.getStatus().getReasonPhrase();
 return ClientResponse.unfinished(super.handleResponse(response, trafficCop).getObj());
}
origin: io.netty/netty

/**
 * Adds a new integer header with the specified name and value.
 */
public static void addIntHeader(HttpMessage message, String name, int value) {
  message.headers().add(name, value);
}
origin: io.netty/netty

/**
 * Sets the {@code "Content-Length"} header.
 */
public static void setContentLength(HttpMessage message, long length) {
  message.headers().set(Names.CONTENT_LENGTH, length);
}
origin: io.netty/netty

/**
 * Removes the {@code "X-SPDY-URL"} header.
 */
public static void removeUrl(HttpMessage message) {
  message.headers().remove(Names.URL);
}
origin: io.netty/netty

/**
 * Removes the header with the specified name.
 */
public static void removeHeader(HttpMessage message, String name) {
  message.headers().remove(name);
}
org.jboss.netty.handler.codec.http

Most used classes

  • HttpResponse
    An HTTP response.ACCESSING COOKIES Unlike the Servlet API, org.jboss.netty.handler.codec.http.cooki
  • HttpRequest
    An HTTP request.ACCESSING QUERY PARAMETERS AND COOKIE Unlike the Servlet API, a query string is con
  • HttpResponseStatus
    The response code and its description of HTTP or its derived protocols, such as RTSP [http://en.wiki
  • DefaultHttpResponse
    The default HttpResponse implementation.
  • HttpHeaders
    Provides the constants for the standard HTTP header names and values and commonly used utility metho
  • HttpResponseEncoder,
  • HttpMethod,
  • HttpChunk,
  • HttpChunkAggregator,
  • DefaultHttpRequest,
  • HttpClientCodec,
  • HttpContentDecompressor,
  • HttpVersion,
  • QueryStringDecoder,
  • DefaultHttpChunk,
  • HttpContentCompressor,
  • HttpRequestEncoder,
  • HttpResponseDecoder,
  • TextWebSocketFrame
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now