• Home
  • Raw
  • Download

Lines Matching full:protocol

39  * Represents a protocol version, as specified in RFC 2616.
42 * for the protocol name. It defines a protocol version "SIP/2.0".
46 * This class defines a protocol version as a combination of
47 * protocol name, major version number, and minor version number.
66 /** Name of the protocol. */
67 protected final String protocol; field in ProtocolVersion
69 /** Major version number of the protocol */
72 /** Minor version number of the protocol */
77 * Create a protocol version designator.
79 * @param protocol the name of the protocol, for example "HTTP"
80 * @param major the major version number of the protocol
81 * @param minor the minor version number of the protocol
83 public ProtocolVersion(String protocol, int major, int minor) { in ProtocolVersion() argument
84 if (protocol == null) { in ProtocolVersion()
86 ("Protocol name must not be null."); in ProtocolVersion()
90 ("Protocol major version number must not be negative."); in ProtocolVersion()
94 ("Protocol minor version number may not be negative"); in ProtocolVersion()
96 this.protocol = protocol; in ProtocolVersion()
102 * Returns the name of the protocol.
104 * @return the protocol name
107 return protocol; in getProtocol()
111 * Returns the major version number of the protocol.
120 * Returns the minor version number of the HTTP protocol.
130 * Obtains a specific version of this protocol.
141 * @return a protocol version with the same protocol name
151 return new ProtocolVersion(this.protocol, major, minor); in forVersion()
158 * @return the hashcode of this protocol version
161 return this.protocol.hashCode() ^ (this.major * 100000) ^ this.minor; in hashCode()
166 * Checks equality of this protocol version with an object.
168 * protocol name, major version number, and minor version number.
175 * @return <code>true</code> if the argument is the same protocol version,
187 return ((this.protocol.equals(that.protocol)) && in equals()
194 * Checks whether this protocol can be compared to another one.
195 * Only protocol versions with the same protocol name can be
198 * @param that the protocol version to consider
204 return (that != null) && this.protocol.equals(that.protocol); in isComparable()
209 * Compares this protocol version with another one.
210 * Only protocol versions with the same protocol name can be compared.
221 * if the argument has a different protocol name than this object,
227 ("Protocol version must not be null."); in compareToVersion()
229 if (!this.protocol.equals(that.protocol)) { in compareToVersion()
244 * Tests if this protocol version is greater or equal to the given one.
248 * @return <code>true</code> if this protocol version is
259 * Tests if this protocol version is less or equal to the given one.
263 * @return <code>true</code> if this protocol version is
274 * Converts this protocol version to a string.
276 * @return a protocol version string, like "HTTP/1.1"
280 buffer.append(this.protocol); in toString()