Codota Logo
org.jboss.netty.handler.codec.http
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
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-URL"} header.
 */
public static void removeUrl(HttpMessage message) {
  message.headers().remove(Names.URL);
}
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 header with the specified name.
 */
public static void removeHeader(HttpMessage message, String name) {
  message.headers().remove(name);
}
origin: io.netty/netty

/**
 * Removes the {@code "X-SPDY-Priority"} header.
 */
public static void removePriority(HttpMessage message) {
  message.headers().remove(Names.PRIORITY);
}
org.jboss.netty.handler.codec.http

Most used classes

  • HttpResponse
  • HttpRequest
  • HttpResponseStatus
  • DefaultHttpResponse
  • HttpHeaders
  • HttpResponseEncoder,
  • HttpMethod,
  • HttpChunk,
  • HttpChunkAggregator,
  • DefaultHttpRequest,
  • HttpClientCodec,
  • HttpContentDecompressor,
  • HttpVersion,
  • QueryStringDecoder,
  • DefaultHttpChunk,
  • HttpContentCompressor,
  • HttpRequestEncoder,
  • HttpResponseDecoder,
  • TextWebSocketFrame
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now