Home | History | Annotate | Download | only in http

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.
61 /** Name of the protocol. */
62 protected final String protocol;
64 /** Major version number of the protocol */
67 /** Minor version number of the protocol */
72 * Create a protocol version designator.
74 * @param protocol the name of the protocol, for example "HTTP"
75 * @param major the major version number of the protocol
76 * @param minor the minor version number of the protocol
78 public ProtocolVersion(String protocol, int major, int minor) {
79 if (protocol == null) {
81 ("Protocol name must not be null.");
85 ("Protocol major version number must not be negative.");
89 ("Protocol minor version number may not be negative");
91 this.protocol = protocol;
97 * Returns the name of the protocol.
99 * @return the protocol name
102 return protocol;
106 * Returns the major version number of the protocol.
115 * Returns the minor version number of the HTTP protocol.
125 * Obtains a specific version of this protocol.
136 * @return a protocol version with the same protocol name
146 return new ProtocolVersion(this.protocol, major, minor);
153 * @return the hashcode of this protocol version
156 return this.protocol.hashCode() ^ (this.major * 100000) ^ this.minor;
161 * Checks equality of this protocol version with an object.
163 * protocol name, major version number, and minor version number.
170 * @return <code>true</code> if the argument is the same protocol version,
182 return ((this.protocol.equals(that.protocol)) &&
189 * Checks whether this protocol can be compared to another one.
190 * Only protocol versions with the same protocol name can be
193 * @param that the protocol version to consider
199 return (that != null) && this.protocol.equals(that.protocol);
204 * Compares this protocol version with another one.
205 * Only protocol versions with the same protocol name can be compared.
216 * if the argument has a different protocol name than this object,
222 ("Protocol version must not be null.");
224 if (!this.protocol.equals(that.protocol)) {
239 * Tests if this protocol version is greater or equal to the given one.
243 * @return <code>true</code> if this protocol version is
254 * Tests if this protocol version is less or equal to the given one.
258 * @return <code>true</code> if this protocol version is
269 * Converts this protocol version to a string.
271 * @return a protocol version string, like "HTTP/1.1"
275 buffer.append(this.protocol);