Java Doc for Dialog.java in  » 6.0-JDK-Modules » j2me » gov » nist » siplite » stack » 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 » j2me » gov.nist.siplite.stack 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gov.nist.siplite.stack.Dialog

Dialog
public class Dialog (Code)
Tracks dialogs. A dialog is a peer to peer association of communicating SIP entities. For INVITE transactions, a Dialog is created when a success message is received (i.e. a response that has a ToHeader tag). The SIP Protocol stores enough state in the message structure to extract a dialog identifier that can be used to retrieve this structure from the SipStack.
version:
   JAIN-SIP-1.1
version:
   This code is in the public domain.


Field Summary
final public static  intCOMPLETED_STATE
     Completed state.
final public static  intCONFIRMED_STATE
     Confirmed state.
final public static  intEARLY_STATE
     Early state.
final public static  intINITIAL_STATE
     Initial state.
final public static  intTERMINATED_STATE
     Terminated state.
protected  booleanackSeen
     ACK has been processed.
protected  RequestlastAck
     Previous ACk.
public  SubscriptionListsubscriptionList
     List of active subscriptions.

Constructor Summary
protected  Dialog(Transaction transaction)
     Constructor given the first transaction.

Method Summary
public  voidackReceived(Request sipRequest)
     Marks that the dialog has seen an ACK.
public synchronized  voidaddRoute(Message sipMessage)
     Extracts the route information from this SIP Message and add the relevant information to the route set.
public  voidaddTransaction(Transaction transaction)
     Adds a transaction record to the dialog.
public  RequestcreateRequest(String method)
     Creates a new Request message based on the dialog creating request. This method should be used for but not limited to creating Bye's, Refer's and re-Invite's on the Dialog.
public  voiddelete()
     This method will release all resources associated with this dialog that are tracked by the Provider.
protected  voiddeleteTransactions()
     Marks all the transactions in the dialog inactive and ready for garbage collection.
public  ObjectgetApplicationData()
     Gets pointer to opaque application data.
public  CallIdHeadergetCallId()
     Returns the Call-ID for this SipSession.
public  StringgetDialogId()
     Gets the id for this dialog.
public  TransactiongetFirstTransaction()
     Gets the transaction that created this dialog.
public  RequestgetLastAck()
     Gets the last ACK.
public  TransactiongetLastTransaction()
     Gets the last transaction from the dialog.
public  AddressgetLocalParty()
     Gets the local Address for this dialog.
public  intgetLocalSequenceNumber()
     Gets the local sequence number (for cseq assignment of outgoing requests within this dialog).
public  StringgetLocalTag()
     Gets local identifier for the dialog.
public  HopgetNextHop()
     Gets the next hop.
public  AddressgetRemoteParty()
     Returns the Address identifying the remote party.
public  intgetRemoteSequenceNumber()
     Gets the remote sequence number (for cseq assignment of outgoing requests within this dialog).
public  StringgetRemoteTag()
     Gets peer identifier identifier for the dialog. This is used in ToHeader header tag construction for all outgoing requests when we are the client of the dialog. This is used in FromHeader tag construction for all outgoing requests when we are the Server of the dialog.
public  AddressgetRemoteTarget()
     Returns the Address identifying the remote target.
public  EnumerationgetRouteSet()
     Gets the route set for the dialog. When acting as an User Agent Server the route set MUST be set to the list of URIs in the Record-Route header field from the request, taken in order and preserving all URI parameters.
public  intgetState()
     Returns the current state of the dialogue.
public  intincrementLocalSequenceNumber()
     Increments the local CSeqHeader # for the dialog.
public  booleanisAckSeen()
     Returns true if the dialog has been acked.
public  booleanisClientDialog()
     Returns true if this is a client dialog.
public  booleanisInviteDialog()
     Checks if this is an invitation dialog.
public  booleanisSecure()
     Returns true if this Dialog is secure i.e.
public  booleanisServer()
     Returns true if is server.
public  booleanisSubscribeDialog()
     Checks if this is a subscription dialog.
public  voidprintTags()
     Debugging print for the dialog.
public  voidresendAck()
     Resends the last ack.
public  voidsendAck(Request request)
     Sends ACK Request to the remote party of this Dialogue.
public  voidsendRequest(ClientTransaction clientTransactionId)
     Sends a Request to the remote party of this dialog.
public  voidsetApplicationData(Object applicationData)
     Sets the pointer to application data.
public  voidsetDefaultRoute(RouteHeader defaultRoute)
     Sets the default route (the default next hop for the proxy or the proxy address for the user agent).
public  voidsetDialogId(String newDialogId)
     Sets the dialog identifier.
protected  voidsetLocalSequenceNumber(int lCseq)
     Sets the local sequece number for the dialog (defaults to 1 when the dialog is created).
public  voidsetLocalTag(String mytag)
     Sets local tag for the transaction.
protected  voidsetRemoteSequenceNumber(int rCseq)
     Sets the remote sequence number for the dialog.
public  voidsetRemoteTag(String hisTag)
     Sets the remote tag.
protected  voidsetRetransmissionTicks()
     Sets retransmission ticks.
public  voidsetStack(SIPTransactionStack sipStack)
     Sets the stack address.
public  voidsetState(int state)
     Sets the state for this dialog.
public  voidsetUser(String user)
     Sets the user name for the default route.
protected  booleantoRetransmitFinalResponse()
     Returns yes if the last response is to be retransmitted.

Field Detail
COMPLETED_STATE
final public static int COMPLETED_STATE(Code)
Completed state.



CONFIRMED_STATE
final public static int CONFIRMED_STATE(Code)
Confirmed state.



EARLY_STATE
final public static int EARLY_STATE(Code)
Early state.



INITIAL_STATE
final public static int INITIAL_STATE(Code)
Initial state.



TERMINATED_STATE
final public static int TERMINATED_STATE(Code)
Terminated state.



ackSeen
protected boolean ackSeen(Code)
ACK has been processed.



lastAck
protected Request lastAck(Code)
Previous ACk.



subscriptionList
public SubscriptionList subscriptionList(Code)
List of active subscriptions.




Constructor Detail
Dialog
protected Dialog(Transaction transaction)(Code)
Constructor given the first transaction.
Parameters:
  transaction - is the first transaction.




Method Detail
ackReceived
public void ackReceived(Request sipRequest)(Code)
Marks that the dialog has seen an ACK.
Parameters:
  sipRequest - the current SIP transaction



addRoute
public synchronized void addRoute(Message sipMessage)(Code)
Extracts the route information from this SIP Message and add the relevant information to the route set.
Parameters:
  sipMessage - is the SIP message for which we wantto add the route.



addTransaction
public void addTransaction(Transaction transaction)(Code)
Adds a transaction record to the dialog.
Parameters:
  transaction - is the transaction to add to the dialog.



createRequest
public Request createRequest(String method) throws SipException(Code)
Creates a new Request message based on the dialog creating request. This method should be used for but not limited to creating Bye's, Refer's and re-Invite's on the Dialog. The returned Request will be correctly formatted that is it will contain the correct CSeqHeader header, Route headers and requestURI (derived from the remote target). This method should not be used for Ack, that is the application should create the Ack from the MessageFactory. If the route set is not empty, and the first URI in the route set contains the lr parameter (see Section 19.1.1), the UAC MUST place the remote target URI into the Request-URI and MUST include a Route header field containing the route set values in order, including all parameters. If the route set is not empty, and its first URI does not contain the lr parameter, the UAC MUST place the first URI from the route set into the Request-URI, stripping any parameters that are not allowed in a Request-URI. The UAC MUST add a Route header field containing the remainder of the route set values in order, including all parameters. The UAC MUST then place the remote target URI into the Route header field as the last value.
Parameters:
  method - the string value that determines if the request to becreated. the newly created Request message on this Dialog.
throws:
  SipException - if the Dialog is not yet established.



delete
public void delete()(Code)
This method will release all resources associated with this dialog that are tracked by the Provider. Further references to the dialog by incoming messages will result in a mismatch. Since dialog destruction is left reasonably open ended in RFC3261, this delete method is provided for future use and extension methods that do not require a BYE to terminate a dialogue. The basic case of the INVITE and all dialogues that we are aware of today it is expected that BYE requests will end the dialogue.



deleteTransactions
protected void deleteTransactions()(Code)
Marks all the transactions in the dialog inactive and ready for garbage collection.



getApplicationData
public Object getApplicationData()(Code)
Gets pointer to opaque application data. application data



getCallId
public CallIdHeader getCallId()(Code)
Returns the Call-ID for this SipSession. This is the value of the Call-ID header for all messages belonging to this session. the Call-ID for this Dialogue



getDialogId
public String getDialogId()(Code)
Gets the id for this dialog. the string identifier for this dialog.



getFirstTransaction
public Transaction getFirstTransaction()(Code)
Gets the transaction that created this dialog. the first transaction



getLastAck
public Request getLastAck()(Code)
Gets the last ACK. the last ack



getLastTransaction
public Transaction getLastTransaction()(Code)
Gets the last transaction from the dialog. last transaction



getLocalParty
public Address getLocalParty()(Code)
Gets the local Address for this dialog. the address object of the local party.



getLocalSequenceNumber
public int getLocalSequenceNumber()(Code)
Gets the local sequence number (for cseq assignment of outgoing requests within this dialog). local sequence number.



getLocalTag
public String getLocalTag()(Code)
Gets local identifier for the dialog. This is used in FromHeader header tag construction for all outgoing client transaction requests for this dialog and for all outgoing responses for this dialog. This is used in ToHeader tag constuction for all outgoing transactions when we are the server of the dialog. Use this when constucting ToHeader header tags for BYE requests when we are the server of the dialog. the local tag.



getNextHop
public Hop getNextHop() throws SipException(Code)
Gets the next hop. the next hop
exception:
  SipException - if an error occurs



getRemoteParty
public Address getRemoteParty()(Code)
Returns the Address identifying the remote party. This is the value of the ToHeader header of locally initiated requests in this dialogue when acting as an User Agent Client.

This is the value of the FromHeader header of recieved responses in this dialogue when acting as an User Agent Server. the address object of the remote party.




getRemoteSequenceNumber
public int getRemoteSequenceNumber()(Code)
Gets the remote sequence number (for cseq assignment of outgoing requests within this dialog). local sequence number.



getRemoteTag
public String getRemoteTag()(Code)
Gets peer identifier identifier for the dialog. This is used in ToHeader header tag construction for all outgoing requests when we are the client of the dialog. This is used in FromHeader tag construction for all outgoing requests when we are the Server of the dialog. Use this when costructing FromHeader header Tags for BYE requests when we are the server of the dialog. the remote tag(note this is read from a response to an INVITE).



getRemoteTarget
public Address getRemoteTarget()(Code)
Returns the Address identifying the remote target. This is the value of the Contact header of recieved Responses for Requests or refresh Requests in this dialogue when acting as an User Agent Client

This is the value of the Contact header of received Requests or refresh Requests in this dialogue when acting as an User the address object of the remote target.




getRouteSet
public Enumeration getRouteSet()(Code)
Gets the route set for the dialog. When acting as an User Agent Server the route set MUST be set to the list of URIs in the Record-Route header field from the request, taken in order and preserving all URI parameters. When acting as an User Agent Client the route set MUST be set to the list of URIs in the Record-Route header field from the response, taken in reverse order and preserving all URI parameters. If no Record-Route header field is present in the request or response, the route set MUST be set to the empty set. This route set, even if empty, overrides any pre-existing route set for future requests in this dialog.

Requests within a dialog MAY contain Record-Route and Contact header fields. However, these requests do not cause the dialog's route set to be modified.

The User Agent Client uses the remote target and route set to build the Request-URI and Route header field of the request. an Iterator containing a list of route headers to be used forforwarding. Empty iterator is returned if route has notbeen established.




getState
public int getState()(Code)
Returns the current state of the dialogue. The states are as follows:
  • Early - A dialog is in the "early" state, which occurs when it is created when a provisional response is recieved to the INVITE Request.
  • Confirmed - A dialog transitions to the "confirmed" state when a 2xx final response is received to the INVITE Request.
  • Completed - A dialog transitions to the "completed" state when a BYE request is sent or received by the User Agent Client.
  • Terminated - A dialog transitions to the "terminated" state when it can be garbage collection.
Independent of the method, if a request outside of a dialog generates a non-2xx final response, any early dialogs created through provisional responses to that request are terminated. If no response arrives at all on the early dialog, it also terminates. a DialogState determining the current state of the dialog.



incrementLocalSequenceNumber
public int incrementLocalSequenceNumber()(Code)
Increments the local CSeqHeader # for the dialog. the incremented local sequence number.



isAckSeen
public boolean isAckSeen()(Code)
Returns true if the dialog has been acked. The ack is sent up to the TU exactly once when retransmission filter is enabled. true if ACK has been processed



isClientDialog
public boolean isClientDialog()(Code)
Returns true if this is a client dialog. true if the transaction that created this dialog is aclient transaction and false otherwise.



isInviteDialog
public boolean isInviteDialog()(Code)
Checks if this is an invitation dialog. true if this is an invitation dialog



isSecure
public boolean isSecure()(Code)
Returns true if this Dialog is secure i.e. if the request arrived over TLS, and the Request-URI contained a SIPS URI, the "secure" flag is set to TRUE. true if this dialogue was established using a sipsURI over TLS, and false otherwise.



isServer
public boolean isServer()(Code)
Returns true if is server. true if is server transaction created this dialog.



isSubscribeDialog
public boolean isSubscribeDialog()(Code)
Checks if this is a subscription dialog. true if this is a subscription dialog



printTags
public void printTags()(Code)
Debugging print for the dialog.



resendAck
public void resendAck()(Code)
Resends the last ack.



sendAck
public void sendAck(Request request) throws SipException(Code)
Sends ACK Request to the remote party of this Dialogue.
Parameters:
  request - the new ACK Request message to send.
throws:
  SipException - if implementation cannot send the ACK Request forany other reason



sendRequest
public void sendRequest(ClientTransaction clientTransactionId) throws SipException(Code)
Sends a Request to the remote party of this dialog. This method implies that the application is functioning as UAC hence the underlying SipProvider acts statefully. This method is useful for sending Bye's for terminating a dialog or Re-Invites on the Dialog for third party call control.

This methods will set the FromHeader and the ToHeader tags for the outgoing request and also set the correct sequence number to the outgoing Request and associate the client transaction with this dialog. Note that any tags assigned by the user will be over-written by this method.

The User Agent must not send a BYE on a confirmed INVITE until it has received an ACK for its 2xx response or until the server transaction timeout is received.

When the retransmissionFilter is true, that is the SipProvider takes care of all retransmissions for the application, and the SipProvider can not deliver the Request after multiple retransmits the SipListener will be notified with a TimeoutEvent when the transaction expires.
Parameters:
  clientTransactionId - the new ClientTransaction object identifyingthis transaction, this clientTransaction should be requested fromSipProvider.getNewClientTransaction
throws:
  TransactionDoesNotExistException - if the serverTransaction doesnot correspond to any existing server transaction.
throws:
  SipException - if implementation cannot send the Request forany reason.




setApplicationData
public void setApplicationData(Object applicationData)(Code)
Sets the pointer to application data.
Parameters:
  applicationData - the new application data



setDefaultRoute
public void setDefaultRoute(RouteHeader defaultRoute)(Code)
Sets the default route (the default next hop for the proxy or the proxy address for the user agent).
Parameters:
  defaultRoute - is the default route to set.



setDialogId
public void setDialogId(String newDialogId)(Code)
Sets the dialog identifier.
Parameters:
  newDialogId - the new dialog identifier



setLocalSequenceNumber
protected void setLocalSequenceNumber(int lCseq)(Code)
Sets the local sequece number for the dialog (defaults to 1 when the dialog is created).
Parameters:
  lCseq - is the local cseq number.



setLocalTag
public void setLocalTag(String mytag)(Code)
Sets local tag for the transaction.
Parameters:
  mytag - is the tag to use in FromHeader headers clienttransactions that belong to this dialog and forgenerating ToHeader tags for Server transaction requests that belongto this dialog.



setRemoteSequenceNumber
protected void setRemoteSequenceNumber(int rCseq)(Code)
Sets the remote sequence number for the dialog.
Parameters:
  rCseq - is the remote cseq number.



setRemoteTag
public void setRemoteTag(String hisTag)(Code)
Sets the remote tag.
Parameters:
  hisTag - is the remote tag to set.



setRetransmissionTicks
protected void setRetransmissionTicks()(Code)
Sets retransmission ticks.



setStack
public void setStack(SIPTransactionStack sipStack)(Code)
Sets the stack address. Prevent us from routing messages to ourselves.
Parameters:
  sipStack - the address of the SIP stack.



setState
public void setState(int state)(Code)
Sets the state for this dialog.
Parameters:
  state - is the state to set for the dialog.



setUser
public void setUser(String user)(Code)
Sets the user name for the default route.
Parameters:
  user - is the user name to set for the default route.



toRetransmitFinalResponse
protected boolean toRetransmitFinalResponse()(Code)
Returns yes if the last response is to be retransmitted. true if final response retransmitted



Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.