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

How to use
equals
method
in
org.apache.commons.httpclient.HttpVersion

Best Java code snippets using org.apache.commons.httpclient.HttpVersion.equals (Showing top 16 results out of 315)

origin: commons-httpclient/commons-httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof HttpVersion)) {
    return false;
  }
  return equals((HttpVersion)obj);  
}
origin: commons-httpclient/commons-httpclient

/**
 * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be 
 * used per default, <tt>false</tt> if version 1.0 should be used.
 *
 * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0
 * 
 * @deprecated Use {@link HttpMethodParams#getVersion()}
 */
public boolean isHttp11() {
  return this.params.getVersion().equals(HttpVersion.HTTP_1_1);
}
origin: org.apache.commons/httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof HttpVersion)) {
    return false;
  }
  return equals((HttpVersion)obj);  
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof HttpVersion)) {
    return false;
  }
  return equals((HttpVersion)obj);  
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof HttpVersion)) {
    return false;
  }
  return equals((HttpVersion)obj);  
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * @see java.lang.Object#equals(java.lang.Object)
 */
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof HttpVersion)) {
    return false;
  }
  return equals((HttpVersion)obj);  
}
origin: org.mule.transports/mule-transport-http

/**
 * The HTTTP spec suggests that for HTTP 1.1 persistent connections should be used, 
 * for HTTP 1.0 the connection should not be kept alive. This method sets up the keepAlive flag
 * according to the <code>version</code> that was passed in.
 */
protected void setupKeepAliveFromRequestVersion(HttpVersion version)
{
  setKeepAlive(version.equals(HttpVersion.HTTP_1_1));
}
origin: org.zaproxy/zap

/**
 * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be 
 * used per default, <tt>false</tt> if version 1.0 should be used.
 *
 * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0
 * 
 * @deprecated Use {@link HttpMethodParams#getVersion()}
 */
@Deprecated
public boolean isHttp11() {
  return this.params.getVersion().equals(HttpVersion.HTTP_1_1);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be 
 * used per default, <tt>false</tt> if version 1.0 should be used.
 *
 * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0
 * 
 * @deprecated Use {@link HttpMethodParams#getVersion()}
 */
public boolean isHttp11() {
  return this.params.getVersion().equals(HttpVersion.HTTP_1_1);
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be 
 * used per default, <tt>false</tt> if version 1.0 should be used.
 *
 * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0
 * 
 * @deprecated Use {@link HttpMethodParams#getVersion()}
 */
public boolean isHttp11() {
  return this.params.getVersion().equals(HttpVersion.HTTP_1_1);
}
origin: org.apache.commons/httpclient

/**
 * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be 
 * used per default, <tt>false</tt> if version 1.0 should be used.
 *
 * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0
 * 
 * @deprecated Use {@link HttpMethodParams#getVersion()}
 */
public boolean isHttp11() {
  return this.params.getVersion().equals(HttpVersion.HTTP_1_1);
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be 
 * used per default, <tt>false</tt> if version 1.0 should be used.
 *
 * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0
 * 
 * @deprecated Use {@link HttpMethodParams#getVersion()}
 */
public boolean isHttp11() {
  return this.params.getVersion().equals(HttpVersion.HTTP_1_1);
}
origin: org.mule.transports/mule-transport-http

private void sendExpect100(HttpRequest request) throws MuleException, IOException
{
  RequestLine requestLine = request.getRequestLine();
  // respond with status code 100, for Expect handshake
  // according to rfc 2616 and http 1.1
  // the processing will continue and the request will be fully
  // read immediately after
  HttpVersion requestVersion = requestLine.getHttpVersion();
  if (HttpVersion.HTTP_1_1.equals(requestVersion))
  {
    Header expectHeader = request.getFirstHeader(HttpConstants.HEADER_EXPECT);
    if (expectHeader != null)
    {
      String expectHeaderValue = expectHeader.getValue();
      if (HttpConstants.HEADER_EXPECT_CONTINUE_REQUEST_VALUE.equals(expectHeaderValue))
      {
        HttpResponse expected = new HttpResponse();
        expected.setStatusLine(requestLine.getHttpVersion(), HttpConstants.SC_CONTINUE);
        final DefaultMuleEvent event = new DefaultMuleEvent(new DefaultMuleMessage(expected,
                                              getEndpoint().getMuleContext()), (InboundEndpoint) endpoint, flowConstruct);
        RequestContext.setEvent(event);
        conn.writeResponse(transformResponse(expected, event));
      }
    }
  }
}
origin: org.mule.transports/mule-transport-http

private void sendExpect100(HttpRequest request) throws MuleException, IOException
{
  RequestLine requestLine = request.getRequestLine();
  // respond with status code 100, for Expect handshake
  // according to rfc 2616 and http 1.1
  // the processing will continue and the request will be fully
  // read immediately after
  HttpVersion requestVersion = requestLine.getHttpVersion();
  if (HttpVersion.HTTP_1_1.equals(requestVersion))
  {
    Header expectHeader = request.getFirstHeader(HttpConstants.HEADER_EXPECT);
    if (expectHeader != null)
    {
      String expectHeaderValue = expectHeader.getValue();
      if (HttpConstants.HEADER_EXPECT_CONTINUE_REQUEST_VALUE.equals(expectHeaderValue))
      {
        HttpResponse expected = new HttpResponse();
        expected.setStatusLine(requestLine.getHttpVersion(), HttpConstants.SC_CONTINUE);
        expected.setKeepAlive(true);
        final DefaultMuleEvent event = new DefaultMuleEvent(new DefaultMuleMessage(expected,
                       getMuleContext()), getInboundEndpoint(), getFlowConstruct());
        RequestContext.setEvent(event);
        httpServerConnection.writeResponse(expected);
      }
    }
  }
}
origin: org.mule.transports/mule-transport-http

    if (response.getHttpVersion().equals(HttpVersion.HTTP_1_0))
else if (request.getRequestLine().getHttpVersion().equals(HttpVersion.HTTP_1_1))
origin: org.mule.transports/mule-transport-http

if (response.getHttpVersion().equals(HttpVersion.HTTP_1_0))
org.apache.commons.httpclientHttpVersionequals

Popular methods of HttpVersion

  • parse
    Parses the textual representation of the given HTTP protocol version.
  • toString
  • lessEquals
    Test if the HTTP protocol version is less or equal to the given number.
  • getMajor
    Returns the major version number of the HTTP protocol.
  • getMinor
    Returns the minor version number of the HTTP protocol.
  • greaterEquals
    Test if the HTTP protocol version is greater or equal to the given number.
  • <init>
    Create an HTTP protocol version designator.
  • compareTo
    Compares this HTTP protocol version with another one.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JList (javax.swing)
  • From CI to AI: The AI layer in your organization
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