Java Doc for ClientTransaction.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.MessageChannel
      gov.nist.siplite.stack.Transaction
         gov.nist.siplite.stack.ClientTransaction

ClientTransaction
public class ClientTransaction extends Transaction implements SIPServerResponseInterface(Code)
Represents a client transaction.
version:
   JAIN-SIP-1.1
version:
   This code is in the public domain.
version:
  

version:
   Implements the following state machines. (FromHeader RFC 3261)
version:
   |INVITE from TU
version:
   Timer A fires |INVITE sent
version:
   Reset A, V Timer B fires
version:
   INVITE sent +-----------+ or Transport Err.
version:
   +---------| |---------------+inform TU
version:
   | | Calling | |
version:
   +-------->| |-------------->|
version:
   +-----------+ 2xx |
version:
   | | 2xx to TU |
version:
   | |1xx |
version:
   300-699 +---------------+ |1xx to TU |
version:
   ACK sent | | |
version:
   resp. to TU | 1xx V |
version:
   | 1xx to TU -----------+ |
version:
   | +---------| | |
version:
   | | |Proceeding |-------------->|
version:
   | +-------->| | 2xx |
version:
   | +-----------+ 2xx to TU |
version:
   | 300-699 | |
version:
   | ACK sent, | |
version:
   | resp. to TU| |
version:
   | | | NOTE:
version:
   | 300-699 V |
version:
   | ACK sent +-----------+Transport Err. | transitions
version:
   | +---------| |Inform TU | labeled with
version:
   | | | Completed |-------------->| the event
version:
   | +-------->| | | over the action
version:
   | +-----------+ | to take
version:
   | ^ | |
version:
   | | | Timer D fires |
version:
   +--------------+ | - |
version:
   | |
version:
   V |
version:
   +-----------+ |
version:
   | | |
version:
   | Terminated|<--------------+
version:
   | |
version:
   +-----------+
version:
   Figure 5: INVITE client transaction
version:
   |Request from TU
version:
   |send request
version:
   Timer E V
version:
   send request +-----------+
version:
   +---------| |-------------------+
version:
   | | Trying | Timer F |
version:
   +-------->| | or Transport Err.|
version:
   +-----------+ inform TU |
version:
   200-699 | | |
version:
   resp. to TU | |1xx |
version:
   +---------------+ |resp. to TU |
version:
   | | |
version:
   | Timer E V Timer F |
version:
   | send req +-----------+ or Transport Err. |
version:
   | +---------| | inform TU |
version:
   | | |Proceeding |------------------>|
version:
   | +-------->| |-----+ |
version:
   | +-----------+ |1xx |
version:
   | | ^ |resp to TU |
version:
   | 200-699 | +--------+ |
version:
   | resp. to TU | |
version:
   | | |
version:
   | V |
version:
   | +-----------+ |
version:
   | | | |
version:
   | | Completed | |
version:
   | | | |
version:
   | +-----------+ |
version:
   | ^ | |
version:
   | | | Timer K |
version:
   +--------------+ | - |
version:
   | |
version:
   V |
version:
   NOTE: +-----------+ |
version:
   | | |
version:
   transitions | Terminated|<------------------+
version:
   labeled with | |
version:
   the event +-----------+
version:
   over the action
version:
   to take
version:
   Figure 6: non-INVITE client transaction
version:
  



Constructor Summary
protected  ClientTransaction(SIPTransactionStack newSIPMessageStack, MessageChannel newChannelToHeaderUse)
     Creates a new client transaction.

Method Summary
public synchronized  voidclearEventPending()
     Clears the event pending flag.
public  ClientTransactioncloneWithNewLastResponse(Response lastResponse)
     Create a new client transaction based on current.
public  RequestcreateAck()
    
public  RequestcreateCancel()
     Creates a new Cancel message from the Request associated with this client transaction.
protected  voidfireRetransmissionTimer()
     Called by the transaction stack when a retransmission timer fires.
protected  voidfireTimeoutTimer()
     Called by the transaction stack when a timeout timer fires.
public  ViaHeadergetOutgoingViaHeader()
     Gets the via header for an outgoing request.
public  StringgetProcessingInfo()
     Gets the processing information.
public  MessageChannelgetRequestChannel()
     Returns this transaction.
public  StringgetViaHost()
     Gets the host of the recipient.
public  intgetViaPort()
     Gets the port of the recipient.
public  booleanisMessagePartOfTransaction(Message messageToHeaderTest)
     Deterines if the message is a part of this transaction.
Parameters:
  messageToHeaderTest - Message to check if it is part of thistransaction.
public  booleanisMessageTransOrMult(Message messageToHeaderTest)
     Deterines if the message is a part of this transaction or it is multiple 2xx response.
Parameters:
  messageToHeaderTest - Message to check if it is part of thistransaction.
public  booleanisMultipleResponse(Response response)
     Deterines if the response is multiple (RFC 3261, 13.2.2.4).
Parameters:
  response - response for checkingtransaction.
public  booleanisSecure()
     Checks if connection is secure.
public synchronized  voidprocessResponse(Response transactionResponse, MessageChannel sourceChannel)
     Processes a new response message through this transaction.
public  voidsendMessage(Message messageToHeaderSend)
     Sends a request message through this transaction and onto the client.
public  voidsendRequest()
     Sends specified gov.nist.siplite.message.Request on a unique client transaction identifier.
public synchronized  voidsetEventPending()
     Sets the event pending flag.
public  voidsetResponseInterface(SIPServerResponseInterface newRespondToHeader)
     Sets the real ResponseInterface this transaction encapsulates.
protected  voidsetViaHost(String host)
     Sets the port of the recipient.
protected  voidsetViaPort(int port)
     Sets the port of the recipient.


Constructor Detail
ClientTransaction
protected ClientTransaction(SIPTransactionStack newSIPMessageStack, MessageChannel newChannelToHeaderUse)(Code)
Creates a new client transaction.
Parameters:
  newSIPMessageStack - Transaction stack this transactionbelongs to.
Parameters:
  newChannelToHeaderUse - Channel to encapsulate.




Method Detail
clearEventPending
public synchronized void clearEventPending()(Code)
Clears the event pending flag.



cloneWithNewLastResponse
public ClientTransaction cloneWithNewLastResponse(Response lastResponse)(Code)
Create a new client transaction based on current. Field lastResponse is filled by input parameter.
Parameters:
  lastResponse - last response new instance of client transaction.



createAck
public Request createAck() throws SipException(Code)
Creates an ACK request for this transaction an ack request generated from the original request.
throws:
  SipException - if transaction is in the wrong state to be acked.



createCancel
public Request createCancel() throws SipException(Code)
Creates a new Cancel message from the Request associated with this client transaction. The CANCEL request, is used to cancel the previous request sent by this client transaction. Specifically, it asks the UAS to cease processing the request and to generate an error response to that request. a cancel request generated from the original request.
throws:
  SipException - if the request cannot be cancelled.



fireRetransmissionTimer
protected void fireRetransmissionTimer()(Code)
Called by the transaction stack when a retransmission timer fires.



fireTimeoutTimer
protected void fireTimeoutTimer()(Code)
Called by the transaction stack when a timeout timer fires.



getOutgoingViaHeader
public ViaHeader getOutgoingViaHeader()(Code)
Gets the via header for an outgoing request. the via header reader



getProcessingInfo
public String getProcessingInfo()(Code)
Gets the processing information. processing information



getRequestChannel
public MessageChannel getRequestChannel()(Code)
Returns this transaction. request channel transaction



getViaHost
public String getViaHost()(Code)
Gets the host of the recipient. the via host



getViaPort
public int getViaPort()(Code)
Gets the port of the recipient. the via port



isMessagePartOfTransaction
public boolean isMessagePartOfTransaction(Message messageToHeaderTest)(Code)
Deterines if the message is a part of this transaction.
Parameters:
  messageToHeaderTest - Message to check if it is part of thistransaction. True if the message is part of this transaction,false if not.



isMessageTransOrMult
public boolean isMessageTransOrMult(Message messageToHeaderTest)(Code)
Deterines if the message is a part of this transaction or it is multiple 2xx response.
Parameters:
  messageToHeaderTest - Message to check if it is part of thistransaction. True if the message is part of this transaction,false if not.



isMultipleResponse
public boolean isMultipleResponse(Response response)(Code)
Deterines if the response is multiple (RFC 3261, 13.2.2.4).
Parameters:
  response - response for checkingtransaction. True if the input response has 2xx status, the currenttransaction has TERMINATED state and the To tag is not same asTo tag of current transaction. This method doesn't compare othermembers, it should be use with method isMessageTransOrMulttogether .



isSecure
public boolean isSecure()(Code)
Checks if connection is secure. true if connection is secure.



processResponse
public synchronized void processResponse(Response transactionResponse, MessageChannel sourceChannel) throws SIPServerException(Code)
Processes a new response message through this transaction. If necessary, this message will also be passed onto the TU.
Parameters:
  transactionResponse - Response to process.
Parameters:
  sourceChannel - Channel that received this message.



sendMessage
public void sendMessage(Message messageToHeaderSend) throws IOException(Code)
Sends a request message through this transaction and onto the client.
Parameters:
  messageToHeaderSend - Request to process and send.



sendRequest
public void sendRequest() throws IOException, SipException(Code)
Sends specified gov.nist.siplite.message.Request on a unique client transaction identifier. This method implies that the application is functioning as either a User Agent Client or a Stateful proxy, hence the underlying SipProvider acts statefully.

JAIN SIP defines a retransmission utility specific to user agent behaviour and the default retransmission behaviour for each method.

When an application wishes to send a message, it creates a Request message passes that Request to this method, this method returns the cleintTransactionId generated by the SipProvider. The Request message gets sent via the ListeningPoint that this SipProvider is attached to.

  • User Agent Client - must not send a BYE on a confirmed INVITE until it has received an ACK for its 2xx response or until the server transaction times out.

throws:
  IOException - if an I/O error occured
throws:
  SipException - if implementation cannot send request for anyother reason



setEventPending
public synchronized void setEventPending()(Code)
Sets the event pending flag.



setResponseInterface
public void setResponseInterface(SIPServerResponseInterface newRespondToHeader)(Code)
Sets the real ResponseInterface this transaction encapsulates.
Parameters:
  newRespondToHeader - ResponseInterface to send messages to.



setViaHost
protected void setViaHost(String host)(Code)
Sets the port of the recipient.
Parameters:
  host - the new via host



setViaPort
protected void setViaPort(int port)(Code)
Sets the port of the recipient.
Parameters:
  port - the new via port



Fields inherited from gov.nist.siplite.stack.Transaction
final protected static int BASE_TIMER_INTERVAL(Code)(Java Doc)
final public static int CALLING_STATE(Code)(Java Doc)
final public static int COMPLETED_STATE(Code)(Java Doc)
final public static int CONFIRMED_STATE(Code)(Java Doc)
final public static int INITIAL_STATE(Code)(Java Doc)
final protected static int MAXIMUM_RETRANSMISSION_TICK_COUNT(Code)(Java Doc)
final public static int PROCEEDING_STATE(Code)(Java Doc)
final protected static int T1(Code)(Java Doc)
final protected static int T2(Code)(Java Doc)
final protected static int T4(Code)(Java Doc)
final public static int TERMINATED_STATE(Code)(Java Doc)
final protected static int TIMER_A(Code)(Java Doc)
final protected static int TIMER_B(Code)(Java Doc)
final protected static int TIMER_C(Code)(Java Doc)
final protected static int TIMER_D(Code)(Java Doc)
final protected static int TIMER_F(Code)(Java Doc)
final protected static int TIMER_H(Code)(Java Doc)
final protected static int TIMER_I(Code)(Java Doc)
final protected static int TIMER_J(Code)(Java Doc)
final protected static int TIMER_K(Code)(Java Doc)
final public static int TRYING_STATE(Code)(Java Doc)
protected boolean ackSeenFlag(Code)(Java Doc)
protected Object applicationData(Code)(Java Doc)
protected Dialog dialog(Code)(Java Doc)
protected MessageChannel encapsulatedChannel(Code)(Java Doc)
protected boolean isCancelled(Code)(Java Doc)
protected Response lastResponse(Code)(Java Doc)
protected SIPTransactionStack parentStack(Code)(Java Doc)
protected boolean toListener(Code)(Java Doc)

Methods inherited from gov.nist.siplite.stack.Transaction
protected boolean IsServerTransaction()(Code)(Java Doc)
public void addEventListener(SIPTransactionEventListener newListener)(Code)(Java Doc)
protected void buildRouteSet(Request request) throws SipException(Code)(Java Doc)
public void close()(Code)(Java Doc)
final protected void disableRetransmissionTimer()(Code)(Java Doc)
final protected void disableTimeoutTimer()(Code)(Java Doc)
public boolean doesCancelMatchTransaction(Request requestToHeaderTest)(Code)(Java Doc)
final protected void enableRetransmissionTimer()(Code)(Java Doc)
final protected void enableRetransmissionTimer(int tickCount)(Code)(Java Doc)
final protected void enableTimeoutTimer(int tickCount)(Code)(Java Doc)
abstract protected void fireRetransmissionTimer()(Code)(Java Doc)
abstract protected void fireTimeoutTimer()(Code)(Java Doc)
final synchronized void fireTimer()(Code)(Java Doc)
public Object getApplicationData()(Code)(Java Doc)
final public String getBranch()(Code)(Java Doc)
public String getBranchId()(Code)(Java Doc)
public Dialog getDialog()(Code)(Java Doc)
public String getHost()(Code)(Java Doc)
public String getKey()(Code)(Java Doc)
public Response getLastResponse()(Code)(Java Doc)
public MessageChannel getMessageChannel()(Code)(Java Doc)
public MessageProcessor getMessageProcessor()(Code)(Java Doc)
public Request getOriginalRequest()(Code)(Java Doc)
public String getPeerAddress()(Code)(Java Doc)
public int getPeerPort()(Code)(Java Doc)
public int getPort()(Code)(Java Doc)
public Request getRequest()(Code)(Java Doc)
public int getRetransmitTimer()(Code)(Java Doc)
public SIPMessageStack getSIPStack()(Code)(Java Doc)
final public int getState()(Code)(Java Doc)
public String getTransactionId()(Code)(Java Doc)
public String getTransport()(Code)(Java Doc)
public ViaHeader getViaHeader()(Code)(Java Doc)
public String getViaHost()(Code)(Java Doc)
public int getViaPort()(Code)(Java Doc)
public void handleException(SIPServerException ex)(Code)(Java Doc)
public boolean isAckSeen()(Code)(Java Doc)
final protected boolean isByeTransaction()(Code)(Java Doc)
final protected boolean isCancelTransaction()(Code)(Java Doc)
final protected boolean isInviteTransaction()(Code)(Java Doc)
abstract public boolean isMessagePartOfTransaction(Message messageToHeaderTest)(Code)(Java Doc)
public boolean isReliable()(Code)(Java Doc)
public boolean isSecure()(Code)(Java Doc)
final protected boolean isTerminated()(Code)(Java Doc)
public boolean passToListener()(Code)(Java Doc)
protected void raiseErrorEvent(int errorEventID)(Code)(Java Doc)
public void removeEventListener(SIPTransactionEventListener oldListener)(Code)(Java Doc)
abstract public void sendMessage(Message messageToHeaderSend) throws IOException(Code)(Java Doc)
protected void sendMessage(byte[] messageBytes, String receiverAddress, int receiverPort) throws IOException(Code)(Java Doc)
public void setAckSeen()(Code)(Java Doc)
public void setApplicationData(Object newApplicationData)(Code)(Java Doc)
final public void setBranch(String newBranch)(Code)(Java Doc)
public void setDialog(Dialog newDialog)(Code)(Java Doc)
public void setOriginalRequest(Request newOriginalRequest)(Code)(Java Doc)
public void setState(int newState)(Code)(Java Doc)

Fields inherited from gov.nist.siplite.stack.MessageChannel
protected MessageProcessor messageProcessor(Code)(Java Doc)

Methods inherited from gov.nist.siplite.stack.MessageChannel
abstract public void close()(Code)(Java Doc)
public String getHost()(Code)(Java Doc)
public HostPort getHostPort()(Code)(Java Doc)
abstract public String getKey()(Code)(Java Doc)
public static String getKey(String inetAddr, int port, String transport)(Code)(Java Doc)
public MessageProcessor getMessageProcessor()(Code)(Java Doc)
abstract public String getPeerAddress()(Code)(Java Doc)
public HostPort getPeerHostPort()(Code)(Java Doc)
abstract public int getPeerPort()(Code)(Java Doc)
public int getPort()(Code)(Java Doc)
abstract public SIPMessageStack getSIPStack()(Code)(Java Doc)
abstract public String getTransport()(Code)(Java Doc)
public ViaHeader getViaHeader()(Code)(Java Doc)
abstract public String getViaHost()(Code)(Java Doc)
public HostPort getViaHostPort()(Code)(Java Doc)
abstract public int getViaPort()(Code)(Java Doc)
abstract public void handleException(SIPServerException ex)(Code)(Java Doc)
abstract public boolean isReliable()(Code)(Java Doc)
abstract public boolean isSecure()(Code)(Java Doc)
protected void logMessage(Message sipMessage, String address, int port, long time)(Code)(Java Doc)
public void logResponse(Response sipResponse, long receptionTime, String status)(Code)(Java Doc)
abstract public void sendMessage(Message sipMessage) throws IOException(Code)(Java Doc)
abstract protected void sendMessage(byte[] message, String receiverAddress, int receiverPort) throws IOException(Code)(Java Doc)
public void sendMessage(Message sipMessage, String receiverAddress, int receiverPort) throws IOException(Code)(Java Doc)

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.