Tabnine Logo
HttpVersion.valueOf
Code IndexAdd Tabnine to your IDE (free)

How to use
valueOf
method
in
org.jboss.netty.handler.codec.http.HttpVersion

Best Java code snippets using org.jboss.netty.handler.codec.http.HttpVersion.valueOf (Showing top 4 results out of 315)

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: io.netty/netty

/**
 * Returns the {@link HttpVersion} represented by the HTTP version header.
 */
public static HttpVersion getVersion(int spdyVersion, SpdyHeadersFrame frame) {
  try {
    return HttpVersion.valueOf(frame.headers().get(HttpNames.VERSION));
  } catch (Exception e) {
    return null;
  }
}
origin: io.netty/netty

@Override
protected HttpMessage createMessage(String[] initialLine) {
  return new DefaultHttpResponse(
      HttpVersion.valueOf(initialLine[0]),
      new HttpResponseStatus(Integer.valueOf(initialLine[1]), initialLine[2]));
}
origin: k3po/k3po

@Override
public void encode(Channel channel) throws Exception {
  HttpChannelConfig httpConfig = (HttpChannelConfig) channel.getConfig();
  ChannelBufferFactory bufferFactory = httpConfig.getBufferFactory();
  String versionName = versionEncoder.encode(bufferFactory).toString(US_ASCII);
  HttpVersion version = HttpVersion.valueOf(versionName);
  httpConfig.setVersion(version);
}
org.jboss.netty.handler.codec.httpHttpVersionvalueOf

Javadoc

Returns an existing or new HttpVersion instance which matches to the specified protocol version string. If the specified text is equal to "HTTP/1.0", #HTTP_1_0 will be returned. If the specified text is equal to "HTTP/1.1", #HTTP_1_1will be returned. Otherwise, a new HttpVersion instance will be returned.

Popular methods of HttpVersion

  • equals
  • getText
    Returns the full protocol version text such as "HTTP/1.0".
  • getMajorVersion
    Returns the name of the protocol such as 1 in "HTTP/1.0".
  • getMinorVersion
    Returns the name of the protocol such as 0 in "HTTP/1.0".
  • getProtocolName
    Returns the name of the protocol such as "HTTP" in "HTTP/1.0".
  • toString
    Returns the full protocol version text such as "HTTP/1.0".
  • isKeepAliveDefault
    Returns true if and only if the connection is kept alive unless the "Connection" header is set to "c
  • <init>
    Creates a new HTTP version with the specified version string. You will not need to create a new inst
  • compareTo

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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