Home | History | Annotate | Download | only in http

Lines Matching refs: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;
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) {
84 if (protocol == null) {
86 ("Protocol name must not be null.");
90 ("Protocol major version number must not be negative.");
94 ("Protocol minor version number may not be negative");
96 this.protocol = protocol;
102 * Returns the name of the protocol.
104 * @return the protocol name
107 return protocol;
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);
158 * @return the hashcode of this protocol version
161 return this.protocol.hashCode() ^ (this.major * 100000) ^ this.minor;
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)) &&
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);
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.");
229 if (!this.protocol.equals(that.protocol)) {
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);