Tabnine Logo
Cookie2.setPortAttributeSpecified
Code IndexAdd Tabnine to your IDE (free)

How to use
setPortAttributeSpecified
method
in
org.apache.commons.httpclient.cookie.Cookie2

Best Java code snippets using org.apache.commons.httpclient.cookie.Cookie2.setPortAttributeSpecified (Showing top 5 results out of 315)

origin: commons-httpclient/commons-httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.apache.commons/httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
origin: org.wso2.commons-httpclient/commons-httpclient

/**
 * Parse cookie port attribute.
 */
public void parse(final Cookie cookie, final String portValue)
    throws MalformedCookieException {
  if (cookie == null) {
    throw new IllegalArgumentException("Cookie may not be null");
  }
  if (cookie instanceof Cookie2) {
    Cookie2 cookie2 = (Cookie2) cookie;
    if ((portValue == null) || (portValue.trim().equals(""))) {
      // If the Port attribute is present but has no value, the
      // cookie can only be sent to the request-port.
      // Since the default port list contains only request-port, we don't
      // need to do anything here.
      cookie2.setPortAttributeBlank(true);
    } else {
      int[] ports = parsePortAttribute(portValue);
      cookie2.setPorts(ports);
    }
    cookie2.setPortAttributeSpecified(true);
  }
}
org.apache.commons.httpclient.cookieCookie2setPortAttributeSpecified

Javadoc

Indicates whether the cookie had a port attribute specified in the Set-Cookie2 response header.

Popular methods of Cookie2

  • <init>
    Creates a cookie with the given name, value, domain attribute, path attribute, expiration attribute,
  • getDomain
  • getExpiryDate
  • getName
  • getPath
  • getPorts
    Get the Port attribute. It restricts the ports to which a cookie may be returned in a Cookie request
  • getValue
  • getVersion
  • isDomainAttributeSpecified
  • isPathAttributeSpecified
  • isPortAttributeBlank
  • isPortAttributeSpecified
  • isPortAttributeBlank,
  • isPortAttributeSpecified,
  • isVersionAttributeSpecified,
  • setCommentURL,
  • setDiscard,
  • setPortAttributeBlank,
  • setPorts,
  • setVersion,
  • setVersionAttributeSpecified

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top plugins for WebStorm
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