Java Doc for FromHeader.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » javax » sip » header » 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 » 6.0 JDK Modules » Java Advanced Imaging » javax.sip.header 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.sip.header.FromHeader

FromHeader
public interface FromHeader extends HeaderAddress,Parameters,Header(Code)
The From header field indicates the logical identity of the initiator of the request, possibly the user's address-of-record. This may be different from the initiator of the dialog. Requests sent by the callee to the caller use the callee's address in the From header field.

Like the To header field, it contains a URI and optionally a display name, encapsulated in a javax.sip.address.Address . It is used by SIP elements to determine which processing rules to apply to a request (for example, automatic call rejection). As such, it is very important that the From URI not contain IP addresses or the FQDN of the host on which the UA is running, since these are not logical names.

The From header field allows for a display name. A UAC SHOULD use the display name "Anonymous", along with a syntactically correct, but otherwise meaningless URI (like sip:thisis@anonymous.invalid), if the identity of the client is to remain hidden.

Usually, the value that populates the From header field in requests generated by a particular UA is pre-provisioned by the user or by the administrators of the user's local domain. If a particular UA is used by multiple users, it might have switchable profiles that include a URI corresponding to the identity of the profiled user. Recipients of requests can authenticate the originator of a request in order to ascertain that they are who their From header field claims they are.

Two From header fields are equivalent if their URIs match, and their parameters match. Extension parameters in one header field, not present in the other are ignored for the purposes of comparison. This means that the display name and presence or absence of angle brackets do not affect matching.

  • The "Tag" parameter - is used in the To and From header fields of SIP messages. It serves as a general mechanism to identify a dialog, which is the combination of the Call-ID along with two tags, one from each participant in the dialog. When a User Agent sends a request outside of a dialog, it contains a From tag only, providing "half" of the dialog ID. The dialog is completed from the response(s), each of which contributes the second half in the To header field. When a tag is generated by a User Agent for insertion into a request or response, it MUST be globally unique and cryptographically random with at least 32 bits of randomness. Besides the requirement for global uniqueness, the algorithm for generating a tag is implementation specific. Tags are helpful in fault tolerant systems, where a dialog is to be recovered on an alternate server after a failure. A UAS can select the tag in such a way that a backup can recognize a request as part of a dialog on the failed server, and therefore determine that it should attempt to recover the dialog and any other state associated with it.
For Example:
From: "Bob" sips:bob@biloxi.com ;tag=a48s
From: sip:+12125551212@phone2net.com;tag=887s
From: Anonymous sip:c8oqz84zk7z@privacy.org;tag=hyh8

author:
   BEA Systems, NIST
version:
   1.2


Field Summary
final public static  StringNAME
    


Method Summary
public  booleanequals(Object obj)
     Compare this FromHeader for equality with another.
public  StringgetTag()
     Gets the tag of FromHeader.
public  voidsetTag(String tag)
     Sets the tag parameter of the FromHeader.

Field Detail
NAME
final public static String NAME(Code)
Name of FromHeader





Method Detail
equals
public boolean equals(Object obj)(Code)
Compare this FromHeader for equality with another. This method overrides the equals method in javax.sip.Header. This method specifies object equality as outlined by RFC3261. Two From header fields are equivalent if their URIs match, and their parameters match. Extension parameters in one header field, not present in the other are ignored for the purposes of comparison. This means that the display name and presence or absence of angle brackets do not affect matching. When comparing header fields, field names are always case-insensitive. Unless otherwise stated in the definition of a particular header field, field values, parameter names, and parameter values are case-insensitive. Tokens are always case-insensitive. Unless specified otherwise, values expressed as quoted strings are case-sensitive.
Parameters:
  obj - the object to compare this FromHeader with. true if obj is an instance of this classrepresenting the same FromHeader as this, false otherwise.
since:
   v1.2



getTag
public String getTag()(Code)
Gets the tag of FromHeader. The Tag parameter identified the Peer of the dialogue and must always be present. the tag parameter of the FromHeader.



setTag
public void setTag(String tag) throws ParseException(Code)
Sets the tag parameter of the FromHeader. The tag in the From field of a request identifies the peer of the dialog. When a UA sends a request outside of a dialog, it contains a From tag only, providing "half" of the dialog Identifier.

The From Header MUST contain a new "tag" parameter, chosen by the UAC applicaton. Once the initial From "tag" is assigned it should not be manipulated by the application. That is on the client side for outbound requests the application is responsible for Tag assigmennment, after dialog establishment the stack will take care of Tag assignment.
Parameters:
  tag - - the new tag of the FromHeader
throws:
  ParseException - which signals that an error has been reachedunexpectedly while parsing the Tag value.




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