Java Doc for ProtocolVersion.java in  » Net » httpcomponents-core-4.0-beta1 » org » apache » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » httpcomponents core 4.0 beta1 » org.apache.http 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.http.ProtocolVersion

All known Subclasses:   org.apache.http.HttpVersion,
ProtocolVersion
public class ProtocolVersion implements Serializable,Cloneable(Code)
Represents a protocol version, as specified in RFC 2616. RFC 2616 specifies only HTTP versions, like "HTTP/1.1" and "HTTP/1.0". RFC 3261 specifies a message format that is identical to HTTP except for the protocol name. It defines a protocol version "SIP/2.0". There are some nitty-gritty differences between the interpretation of versions in HTTP and SIP. In those cases, HTTP takes precedence.

This class defines a protocol version as a combination of protocol name, major version number, and minor version number. Note that ProtocolVersion.equals and ProtocolVersion.hashCode are defined as final here, they cannot be overridden in derived classes.
author:
   Oleg Kalnichevski
author:
   Roland Weber
version:
   $Revision: 609106 $



Field Summary
final protected  intmajor
    
final protected  intminor
    
final protected  Stringprotocol
     Name of the protocol.

Constructor Summary
public  ProtocolVersion(String protocol, int major, int minor)
     Create a protocol version designator.

Method Summary
public  Objectclone()
    
public  intcompareToVersion(ProtocolVersion that)
     Compares this protocol version with another one.
final public  booleanequals(Object obj)
     Checks equality of this protocol version with an object.
public  ProtocolVersionforVersion(int major, int minor)
     Obtains a specific version of this protocol.
final public  intgetMajor()
     Returns the major version number of the protocol.
final public  intgetMinor()
     Returns the minor version number of the HTTP protocol.
final public  StringgetProtocol()
     Returns the name of the protocol.
final public  booleangreaterEquals(ProtocolVersion version)
     Tests if this protocol version is greater or equal to the given one.
final public  inthashCode()
     Obtains a hash code consistent with ProtocolVersion.equals .
public  booleanisComparable(ProtocolVersion that)
     Checks whether this protocol can be compared to another one.
final public  booleanlessEquals(ProtocolVersion version)
     Tests if this protocol version is less or equal to the given one.
public  StringtoString()
     Converts this protocol version to a string.

Field Detail
major
final protected int major(Code)
Major version number of the protocol



minor
final protected int minor(Code)
Minor version number of the protocol



protocol
final protected String protocol(Code)
Name of the protocol.




Constructor Detail
ProtocolVersion
public ProtocolVersion(String protocol, int major, int minor)(Code)
Create a protocol version designator.
Parameters:
  protocol - the name of the protocol, for example "HTTP"
Parameters:
  major - the major version number of the protocol
Parameters:
  minor - the minor version number of the protocol




Method Detail
clone
public Object clone() throws CloneNotSupportedException(Code)



compareToVersion
public int compareToVersion(ProtocolVersion that)(Code)
Compares this protocol version with another one. Only protocol versions with the same protocol name can be compared. This method does not define a total ordering, as it would be required for java.lang.Comparable .
Parameters:
  that - the protocl version to compare with a negative integer, zero, or a positive integeras this version is less than, equal to, or greater thanthe argument version.
throws:
  IllegalArgumentException - if the argument has a different protocol name than this object,or if the argument is null



equals
final public boolean equals(Object obj)(Code)
Checks equality of this protocol version with an object. The object is equal if it is a protocl version with the same protocol name, major version number, and minor version number. The specific class of the object is not relevant, instances of derived classes with identical attributes are equal to instances of the base class and vice versa.
Parameters:
  obj - the object to compare with true if the argument is the same protocol version,false otherwise



forVersion
public ProtocolVersion forVersion(int major, int minor)(Code)
Obtains a specific version of this protocol. This can be used by derived classes to instantiate themselves instead of the base class, and to define constants for commonly used versions.
The default implementation in this class returns this if the version matches, and creates a new ProtocolVersion otherwise.
Parameters:
  major - the major version
Parameters:
  minor - the minor version a protocol version with the same protocol nameand the argument version



getMajor
final public int getMajor()(Code)
Returns the major version number of the protocol. the major version number.



getMinor
final public int getMinor()(Code)
Returns the minor version number of the HTTP protocol. the minor version number.



getProtocol
final public String getProtocol()(Code)
Returns the name of the protocol. the protocol name



greaterEquals
final public boolean greaterEquals(ProtocolVersion version)(Code)
Tests if this protocol version is greater or equal to the given one.
Parameters:
  version - the version against which to check this version true if this protocol version isProtocolVersion.isComparable comparable to the argumentand ProtocolVersion.compareToVersion compares as greater or equal,false otherwise



hashCode
final public int hashCode()(Code)
Obtains a hash code consistent with ProtocolVersion.equals . the hashcode of this protocol version



isComparable
public boolean isComparable(ProtocolVersion that)(Code)
Checks whether this protocol can be compared to another one. Only protocol versions with the same protocol name can be ProtocolVersion.compareToVersion compared .
Parameters:
  that - the protocol version to consider true if ProtocolVersion.compareToVersion compareToVersioncan be called with the argument, false otherwise



lessEquals
final public boolean lessEquals(ProtocolVersion version)(Code)
Tests if this protocol version is less or equal to the given one.
Parameters:
  version - the version against which to check this version true if this protocol version isProtocolVersion.isComparable comparable to the argumentand ProtocolVersion.compareToVersion compares as less or equal,false otherwise



toString
public String toString()(Code)
Converts this protocol version to a string. a protocol version string, like "HTTP/1.1"



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.