Java Doc for Transaction.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

All known Subclasses:   gov.nist.siplite.stack.ServerTransaction,  gov.nist.siplite.stack.ClientTransaction,
Transaction
abstract public class Transaction extends MessageChannel (Code)
Abstract class to support both client and server transactions. Provides an encapsulation of a message channel, handles timer events, and creation of the Via header for a message.
version:
   JAIN-SIP-1.1


Field Summary
final protected static  intBASE_TIMER_INTERVAL
     Transaction timer interval.
final public static  intCALLING_STATE
     CALLING State.
final public static  intCOMPLETED_STATE
     Completed state.
final public static  intCONFIRMED_STATE
     Confirmed state.
final public static  intINITIAL_STATE
     Initialized but no state assigned.
final protected static  intMAXIMUM_RETRANSMISSION_TICK_COUNT
     Maximum number of ticks between retransmissions.
final public static  intPROCEEDING_STATE
     Proceeding state.
final protected static  intT1
     RTT Estimate.
final protected static  intT2
    
final protected static  intT4
    
final public static  intTERMINATED_STATE
     Terminated state.
final protected static  intTIMER_A
    
final protected static  intTIMER_B
    
final protected static  intTIMER_C
    
final protected static  intTIMER_D
    
final protected static  intTIMER_F
    
final protected static  intTIMER_H
    
final protected static  intTIMER_I
    
final protected static  intTIMER_J
    
final protected static  intTIMER_K
    
final public static  intTRYING_STATE
     Trying state.
protected  booleanackSeenFlag
     Flag indicating an ACK was received.
protected  ObjectapplicationData
     Object representing the connection being held by the JSR180 Implementation It can be either a SipClientConnection in case of a ClientTransaction or a SipConnectionNotifier in case of a ServerTransaction.
protected  Dialogdialog
     Current SIP dialog.
protected  MessageChannelencapsulatedChannel
     Underlying channel being used to send messages for this transaction.
protected  booleanisCancelled
     Flag to indcate that this has been cancelled.
protected  ResponselastResponse
     Last response message.
protected  SIPTransactionStackparentStack
     Parent stack for this transaction.
protected  booleantoListener
     Flag indicating listener waiting.

Constructor Summary
protected  Transaction(SIPTransactionStack newParentStack, MessageChannel newEncapsulatedChannel)
     Transaction constructor.

Method Summary
protected  booleanIsServerTransaction()
     A shortcut way of telling if we are a server transaction.
public  voidaddEventListener(SIPTransactionEventListener newListener)
     Adds a new event listener to this transaction.
protected  voidbuildRouteSet(Request request)
     Create route set for request.
public  voidclose()
     Closes the encapsulated channel.
final protected  voiddisableRetransmissionTimer()
     Turns off retransmission events for this transaction.
final protected  voiddisableTimeoutTimer()
     Disabled the timeout timer.
public  booleandoesCancelMatchTransaction(Request requestToHeaderTest)
     A method that can be used to test if an incoming request belongs to this transction.
final protected  voidenableRetransmissionTimer()
     Enables retransmission timer events for this transaction to begin in one tick.
final protected  voidenableRetransmissionTimer(int tickCount)
     Enables retransmission timer events for this transaction to begin after the number of ticks passed to this routine.
final protected  voidenableTimeoutTimer(int tickCount)
     Enables a timeout event to occur for this transaction after the number of ticks passed to this method.
abstract protected  voidfireRetransmissionTimer()
     This method is called when this transaction's retransmission timer has fired.
abstract protected  voidfireTimeoutTimer()
     This method is called when this transaction's timeout timer has fired.
final synchronized  voidfireTimer()
     Fired after each timer tick.
public  ObjectgetApplicationData()
     Retrieves the application data. Object representing the connection being held by the JSR180Implementation.
final public  StringgetBranch()
     Gets the current setting for the branch parameter of this transaction.
public  StringgetBranchId()
     Gets the branch identifier.
public  DialoggetDialog()
     Gets the dialog object of this Transaction object.
public  StringgetHost()
     Gets the host.
public  StringgetKey()
     Gets the key.
public  ResponsegetLastResponse()
     Gets the last response.
public  MessageChannelgetMessageChannel()
     Returns the message channel used for transmitting/receiving messages for this transaction.
public  MessageProcessorgetMessageProcessor()
     Gets the message processor handling this transaction.
public  RequestgetOriginalRequest()
     Gets the request being handled by this transaction.
public  StringgetPeerAddress()
     Gets the remote address.
public  intgetPeerPort()
     Gets the remote port number.
public  intgetPort()
     Gets the port.
public  RequestgetRequest()
     Gets the original request but cast to a Request structure.
public  intgetRetransmitTimer()
     Returns the current value of the retransmit timer in milliseconds used to retransmit messages over unreliable transports.
public  SIPMessageStackgetSIPStack()
     Gets the SIP stack context.
final public  intgetState()
     Gets the current state of this transaction.
public  StringgetTransactionId()
     Gets the transaction Id.
public  StringgetTransport()
     Gets the connection transport.
public  ViaHeadergetViaHeader()
     Returns the Via header for this channel.
public  StringgetViaHost()
     Gets the host to assign for an outgoing Request via header.
public  intgetViaPort()
     Gets the port to assign for the via header of an outgoing message.
public  voidhandleException(SIPServerException ex)
     Process an exception.
public  booleanisAckSeen()
     Checks if the ACK has been seen flag is set.
final protected  booleanisByeTransaction()
     Returns a flag that states if this is a BYE transaction.
final protected  booleanisCancelTransaction()
     Returns true if the transaction corresponds to a CANCEL message.
final protected  booleanisInviteTransaction()
     Returns a flag stating whether this transaction is for an INVITE request or not.
abstract public  booleanisMessagePartOfTransaction(Message messageToHeaderTest)
     Tests a message to see if it is part of this transaction.
public  booleanisReliable()
    
public  booleanisSecure()
     Check if this connection is secure.
final protected  booleanisTerminated()
     Tests if this transaction has terminated.
public  booleanpassToListener()
     Checks if transaction has been sent to the listener.
protected  voidraiseErrorEvent(int errorEventID)
     Creates a SIPTransactionErrorEvent and sends it to all of the listeners of this transaction.
public  voidremoveEventListener(SIPTransactionEventListener oldListener)
     Removes an event listener from this transaction.
abstract public  voidsendMessage(Message messageToHeaderSend)
     Processes the message through the transaction and sends it to the SIP peer.
protected  voidsendMessage(byte[] messageBytes, String receiverAddress, int receiverPort)
     Parses the byte array as a message, process it through the transaction, and send it to the SIP peer.
public  voidsetAckSeen()
     Sets the ACK has been seen flag.
public  voidsetApplicationData(Object newApplicationData)
     Sets the application data.
Parameters:
  newApplicationData - Object representing the connection being heldby the JSR180Implementation.
final public  voidsetBranch(String newBranch)
     Sets the Via header branch parameter used to identify this transaction.
public  voidsetDialog(Dialog newDialog)
     Sets the dialog object.
public  voidsetOriginalRequest(Request newOriginalRequest)
     Sets the request message that this transaction handles.
public  voidsetState(int newState)
     Changes the state of this transaction.

Field Detail
BASE_TIMER_INTERVAL
final protected static int BASE_TIMER_INTERVAL(Code)
Transaction timer interval.



CALLING_STATE
final public static int CALLING_STATE(Code)
CALLING State.



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



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



INITIAL_STATE
final public static int INITIAL_STATE(Code)
Initialized but no state assigned.



MAXIMUM_RETRANSMISSION_TICK_COUNT
final protected static int MAXIMUM_RETRANSMISSION_TICK_COUNT(Code)
Maximum number of ticks between retransmissions.



PROCEEDING_STATE
final public static int PROCEEDING_STATE(Code)
Proceeding state.



T1
final protected static int T1(Code)
RTT Estimate. 500ms default.



T2
final protected static int T2(Code)
The maximum retransmit interval for non-INVITE requests and INVITE responses



T4
final protected static int T4(Code)
5 sec Maximum duration a message will remain in the network



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



TIMER_A
final protected static int TIMER_A(Code)
INVITE request retransmit interval, for UDP only



TIMER_B
final protected static int TIMER_B(Code)
INVITE transaction timeout timer



TIMER_C
final protected static int TIMER_C(Code)
INVITE transaction timeout timer



TIMER_D
final protected static int TIMER_D(Code)
INVITE transaction timeout timer



TIMER_F
final protected static int TIMER_F(Code)
INVITE transaction timeout timer



TIMER_H
final protected static int TIMER_H(Code)
INVITE transaction timeout timer



TIMER_I
final protected static int TIMER_I(Code)
INVITE transaction timeout timer



TIMER_J
final protected static int TIMER_J(Code)
INVITE transaction timeout timer



TIMER_K
final protected static int TIMER_K(Code)
INVITE transaction timeout timer



TRYING_STATE
final public static int TRYING_STATE(Code)
Trying state.



ackSeenFlag
protected boolean ackSeenFlag(Code)
Flag indicating an ACK was received.



applicationData
protected Object applicationData(Code)
Object representing the connection being held by the JSR180 Implementation It can be either a SipClientConnection in case of a ClientTransaction or a SipConnectionNotifier in case of a ServerTransaction.



dialog
protected Dialog dialog(Code)
Current SIP dialog.



encapsulatedChannel
protected MessageChannel encapsulatedChannel(Code)
Underlying channel being used to send messages for this transaction.



isCancelled
protected boolean isCancelled(Code)
Flag to indcate that this has been cancelled.



lastResponse
protected Response lastResponse(Code)
Last response message.



parentStack
protected SIPTransactionStack parentStack(Code)
Parent stack for this transaction.



toListener
protected boolean toListener(Code)
Flag indicating listener waiting.




Constructor Detail
Transaction
protected Transaction(SIPTransactionStack newParentStack, MessageChannel newEncapsulatedChannel)(Code)
Transaction constructor.
Parameters:
  newParentStack - Parent stack for this transaction.
Parameters:
  newEncapsulatedChannel - Underlying channel for this transaction.




Method Detail
IsServerTransaction
protected boolean IsServerTransaction()(Code)
A shortcut way of telling if we are a server transaction. true if this is a servertransaction



addEventListener
public void addEventListener(SIPTransactionEventListener newListener)(Code)
Adds a new event listener to this transaction.
Parameters:
  newListener - Listener to add.



buildRouteSet
protected void buildRouteSet(Request request) throws SipException(Code)
Create route set for request.
Parameters:
  request - the input request
throws:
  SipException - if any occurs



close
public void close()(Code)
Closes the encapsulated channel.



disableRetransmissionTimer
final protected void disableRetransmissionTimer()(Code)
Turns off retransmission events for this transaction.



disableTimeoutTimer
final protected void disableTimeoutTimer()(Code)
Disabled the timeout timer.



doesCancelMatchTransaction
public boolean doesCancelMatchTransaction(Request requestToHeaderTest)(Code)
A method that can be used to test if an incoming request belongs to this transction. This does not take the transaction state into account when doing the check otherwise it is identical to isMessagePartOfTransaction. This is useful for checking if a CANCEL belongs to this transaction.
Parameters:
  requestToHeaderTest - is the request to test. true if the the request belongs to the transaction.



enableRetransmissionTimer
final protected void enableRetransmissionTimer()(Code)
Enables retransmission timer events for this transaction to begin in one tick.



enableRetransmissionTimer
final protected void enableRetransmissionTimer(int tickCount)(Code)
Enables retransmission timer events for this transaction to begin after the number of ticks passed to this routine.
Parameters:
  tickCount - Number of ticks before thenext retransmission timerevent occurs.



enableTimeoutTimer
final protected void enableTimeoutTimer(int tickCount)(Code)
Enables a timeout event to occur for this transaction after the number of ticks passed to this method.
Parameters:
  tickCount - Number of ticks before this transaction times out.



fireRetransmissionTimer
abstract protected void fireRetransmissionTimer()(Code)
This method is called when this transaction's retransmission timer has fired.



fireTimeoutTimer
abstract protected void fireTimeoutTimer()(Code)
This method is called when this transaction's timeout timer has fired.



fireTimer
final synchronized void fireTimer()(Code)
Fired after each timer tick. Checks the retransmission and timeout timers of this transaction, and fired these events if necessary.



getApplicationData
public Object getApplicationData()(Code)
Retrieves the application data. Object representing the connection being held by the JSR180Implementation. It can be either a SipClientConnection in case of aClientTransaction or a SipConnectionNotifier in case of aServerTransaction



getBranch
final public String getBranch()(Code)
Gets the current setting for the branch parameter of this transaction. Branch parameter for this transaction.



getBranchId
public String getBranchId()(Code)
Gets the branch identifier. the current branch id



getDialog
public Dialog getDialog()(Code)
Gets the dialog object of this Transaction object. This object returns null if no dialog exists. A dialog only exists for a transaction when a session is setup between a User Agent Client and a User Agent Server, either by a 1xx Provisional Response for an early dialog or a 200OK Response for a committed dialog. the Dialog Object of this Transaction object.
See Also:   Dialog



getHost
public String getHost()(Code)
Gets the host. the host



getKey
public String getKey()(Code)
Gets the key. the key



getLastResponse
public Response getLastResponse()(Code)
Gets the last response. the last response



getMessageChannel
public MessageChannel getMessageChannel()(Code)
Returns the message channel used for transmitting/receiving messages for this transaction. Made public in support of JAIN dual transaction model. Encapsulated MessageChannel.



getMessageProcessor
public MessageProcessor getMessageProcessor()(Code)
Gets the message processor handling this transaction. the mesage processor for this transaction



getOriginalRequest
public Request getOriginalRequest()(Code)
Gets the request being handled by this transaction. Request being handled.



getPeerAddress
public String getPeerAddress()(Code)
Gets the remote address. the remote address



getPeerPort
public int getPeerPort()(Code)
Gets the remote port number. the remote port number



getPort
public int getPort()(Code)
Gets the port. the port



getRequest
public Request getRequest()(Code)
Gets the original request but cast to a Request structure. the request that generated this transaction.



getRetransmitTimer
public int getRetransmitTimer()(Code)
Returns the current value of the retransmit timer in milliseconds used to retransmit messages over unreliable transports. the integer value of the retransmit timer in milliseconds.



getSIPStack
public SIPMessageStack getSIPStack()(Code)
Gets the SIP stack context. the SIP Stack



getState
final public int getState()(Code)
Gets the current state of this transaction. Current state of this transaction.



getTransactionId
public String getTransactionId()(Code)
Gets the transaction Id. the transaction id



getTransport
public String getTransport()(Code)
Gets the connection transport. the connection transport



getViaHeader
public ViaHeader getViaHeader()(Code)
Returns the Via header for this channel. Gets the Via header of the underlying message channel, and adds a branch parameter to it for this transaction. the via header



getViaHost
public String getViaHost()(Code)
Gets the host to assign for an outgoing Request via header. the via host



getViaPort
public int getViaPort()(Code)
Gets the port to assign for the via header of an outgoing message. the via port number



handleException
public void handleException(SIPServerException ex)(Code)
Process an exception.
Parameters:
  ex - the exception to handle



isAckSeen
public boolean isAckSeen()(Code)
Checks if the ACK has been seen flag is set. true if the ACK has been seen



isByeTransaction
final protected boolean isByeTransaction()(Code)
Returns a flag that states if this is a BYE transaction. true if the transaciton is a BYE transaction.



isCancelTransaction
final protected boolean isCancelTransaction()(Code)
Returns true if the transaction corresponds to a CANCEL message. true if the transaciton is a CANCEL transaction.



isInviteTransaction
final protected boolean isInviteTransaction()(Code)
Returns a flag stating whether this transaction is for an INVITE request or not. True if this is an INVITE request, false if not.



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



isReliable
public boolean isReliable()(Code)
Checks if the connection is reliable true if channel is on a stream connection



isSecure
public boolean isSecure()(Code)
Check if this connection is secure. true if this is a secure channel



isTerminated
final protected boolean isTerminated()(Code)
Tests if this transaction has terminated. Trus if this transaction is terminated, false if not.



passToListener
public boolean passToListener()(Code)
Checks if transaction has been sent to the listener. true if transaction has been sent



raiseErrorEvent
protected void raiseErrorEvent(int errorEventID)(Code)
Creates a SIPTransactionErrorEvent and sends it to all of the listeners of this transaction. This method also flags the transaction as terminated.
Parameters:
  errorEventID - ID of the error to raise.



removeEventListener
public void removeEventListener(SIPTransactionEventListener oldListener)(Code)
Removes an event listener from this transaction.
Parameters:
  oldListener - Listener to remove.



sendMessage
abstract public void sendMessage(Message messageToHeaderSend) throws IOException(Code)
Processes the message through the transaction and sends it to the SIP peer.
Parameters:
  messageToHeaderSend - Message to send to the SIP peer.



sendMessage
protected void sendMessage(byte[] messageBytes, String receiverAddress, int receiverPort) throws IOException(Code)
Parses the byte array as a message, process it through the transaction, and send it to the SIP peer.
Parameters:
  messageBytes - Bytes of the message to send.
Parameters:
  receiverAddress - Address of the target peer.
Parameters:
  receiverPort - Network port of the target peer.
throws:
  IOException - If there is an error parsingthe byte array into an object.



setAckSeen
public void setAckSeen()(Code)
Sets the ACK has been seen flag.



setApplicationData
public void setApplicationData(Object newApplicationData)(Code)
Sets the application data.
Parameters:
  newApplicationData - Object representing the connection being heldby the JSR180Implementation. It can be either a SipClientConnection in case of aClientTransaction or a SipConnectionNotifier in case of aServerTransaction



setBranch
final public void setBranch(String newBranch)(Code)
Sets the Via header branch parameter used to identify this transaction.
Parameters:
  newBranch - New string used as the branchfor this transaction.



setDialog
public void setDialog(Dialog newDialog)(Code)
Sets the dialog object.
Parameters:
  newDialog - the dialog to set.



setOriginalRequest
public void setOriginalRequest(Request newOriginalRequest)(Code)
Sets the request message that this transaction handles.
Parameters:
  newOriginalRequest - Request being handled.



setState
public void setState(int newState)(Code)
Changes the state of this transaction.
Parameters:
  newState - New state of this transaction.



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.