Java Doc for SIPTransactionStack.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.SIPMessageStack
      gov.nist.siplite.stack.SIPTransactionStack

All known Subclasses:   gov.nist.siplite.SipStack,
SIPTransactionStack
abstract public class SIPTransactionStack extends SIPMessageStack implements SIPTransactionEventListener(Code)
Adds a transaction layer to the SIPMessageStack class. This is done by replacing the normal MessageChannels returned by the base class with transaction-aware MessageChannels that encapsulate the original channels and handle the transaction state machine, retransmissions, etc. This code is in the public domain.
version:
   JAIN-SIP-1.1

Inner Class :class TransactionScanner implements Runnable

Field Summary
final public static  intBASE_TIMER_INTERVAL
     Number of milliseconds between timer ticks (500).
protected  HashtabledialogCreatingMethods
     A set of methods that result in dialog creations.
protected  booleanretransmissionFilter
     Retransmission filter - indicates the stack will retransmit 200 OK for invite transactions.
protected  inttransactionTableSize
     Max number of server transactions concurrent.

Constructor Summary
protected  SIPTransactionStack()
     Default constructor.
protected  SIPTransactionStack(SIPStackMessageFactory messageFactory)
     Construcor for the stack.

Method Summary
public  voidaddExtensionMethod(String extensionMethod)
     Adds an extension method.
public  voidaddTransaction(ClientTransaction clientTransaction)
     Adds a new client transaction to the set of existing transactions.
public  voidaddTransaction(ServerTransaction serverTransaction)
     Adds a new client transaction to the set of existing transactions.
public  booleanallowDialogStateChange(String method)
     Returns true if method can change dialog state.
public  ClientTransactioncreateClientTransaction(MessageChannel encapsulatedMessageChannel)
     Creates a client transaction that encapsulates a MessageChannel. Useful for implementations that want to subclass the standard
Parameters:
  encapsulatedMessageChannel - Message channel of the transport layer.
public synchronized  DialogcreateDialog(Transaction transaction)
     Creates a new dialog for requested transaction.
public  MessageChannelcreateMessageChannel(Hop nextHop)
     Creates a client transaction to handle a new request. Gets the real message channel from the superclass, and then creates a new client transaction wrapped around this channel.
Parameters:
  nextHop - Hop to create a channel to contact.
public  MessageChannelcreateMessageChannel(MessageChannel rawChannel)
     Creates a client transaction from a raw channel.
Parameters:
  rawChannel - is the transport channel to encapsulate.
public  MessageChannelcreateMessageChannel(Transaction transaction)
     Creates a client transaction from a raw channel.
public  MessageChannelcreateRawMessageChannel(Hop hop)
     Creates a raw message channel.
public  ServerTransactioncreateServerTransaction(MessageChannel encapsulatedMessageChannel)
     Creates a server transaction that encapsulates a MessageChannel. Useful for implementations that want to subclass the standard
Parameters:
  encapsulatedMessageChannel - Message channel of the transport layer.
public  TransactionfindCancelTransaction(Request cancelRequest, boolean isServer)
     Gets the transaction to cancel.
public  ClientTransactionfindSubscribeTransaction(Request notifyMessage)
     Finds a matching client SUBSCRIBE to the incoming notify. NOTIFY requests are matched to such SUBSCRIBE requests if they contain the same "Call-ID", a "ToHeader" header "tag" parameter which matches the "FromHeader" header "tag" parameter of the SUBSCRIBE, and the same "Event" header field.
public  TransactionfindTransaction(Message sipMessage, boolean isServer)
     Finds the transaction corresponding to a given request.
Parameters:
  sipMessage - request for which to retrieve the transaction.
Parameters:
  isServer - search the server transaction table if true.
public  DialoggetDialog(String dialogId)
     Returns the dialog for a given dialog ID.
public  booleanisDialogCreated(String method)
     Returns true if extension is supported.
protected  SIPServerRequestInterfacenewSIPServerRequest(Request requestReceived, MessageChannel requestMessageChannel)
     Handles a new SIP request. It finds a server transaction to handle this message.
 SIPServerResponseInterfacenewSIPServerResponse(Response responseReceived, MessageChannel responseMessageChannel)
     Handles a new SIP response. It finds a client transaction to handle this message.
public  voidputDialog(Dialog dialog)
     Puts a dialog into the dialog table.

Field Detail
BASE_TIMER_INTERVAL
final public static int BASE_TIMER_INTERVAL(Code)
Number of milliseconds between timer ticks (500).



dialogCreatingMethods
protected Hashtable dialogCreatingMethods(Code)
A set of methods that result in dialog creations.



retransmissionFilter
protected boolean retransmissionFilter(Code)
Retransmission filter - indicates the stack will retransmit 200 OK for invite transactions.



transactionTableSize
protected int transactionTableSize(Code)
Max number of server transactions concurrent.




Constructor Detail
SIPTransactionStack
protected SIPTransactionStack()(Code)
Default constructor.



SIPTransactionStack
protected SIPTransactionStack(SIPStackMessageFactory messageFactory)(Code)
Construcor for the stack. Registers the request and response factories for the stack.
Parameters:
  messageFactory - User-implemented factory for processingmessages.




Method Detail
addExtensionMethod
public void addExtensionMethod(String extensionMethod)(Code)
Adds an extension method.
Parameters:
  extensionMethod - -- extension method to support for dialogcreation



addTransaction
public void addTransaction(ClientTransaction clientTransaction)(Code)
Adds a new client transaction to the set of existing transactions.
Parameters:
  clientTransaction - -- client transaction to add to the set.



addTransaction
public void addTransaction(ServerTransaction serverTransaction) throws IOException(Code)
Adds a new client transaction to the set of existing transactions.
Parameters:
  serverTransaction - -- server transaction to add to the set.



allowDialogStateChange
public boolean allowDialogStateChange(String method)(Code)
Returns true if method can change dialog state.
Parameters:
  method - the name of the method used for create true if extension is supported and false otherwise.



createClientTransaction
public ClientTransaction createClientTransaction(MessageChannel encapsulatedMessageChannel)(Code)
Creates a client transaction that encapsulates a MessageChannel. Useful for implementations that want to subclass the standard
Parameters:
  encapsulatedMessageChannel - Message channel of the transport layer. the requested client transaction



createDialog
public synchronized Dialog createDialog(Transaction transaction)(Code)
Creates a new dialog for requested transaction.
Parameters:
  transaction - the requested transaction the new Dialog object



createMessageChannel
public MessageChannel createMessageChannel(Hop nextHop)(Code)
Creates a client transaction to handle a new request. Gets the real message channel from the superclass, and then creates a new client transaction wrapped around this channel.
Parameters:
  nextHop - Hop to create a channel to contact. the requested message channel



createMessageChannel
public MessageChannel createMessageChannel(MessageChannel rawChannel)(Code)
Creates a client transaction from a raw channel.
Parameters:
  rawChannel - is the transport channel to encapsulate. the requested message channel



createMessageChannel
public MessageChannel createMessageChannel(Transaction transaction)(Code)
Creates a client transaction from a raw channel.
Parameters:
  transaction - the requested transaction the requested message channel



createRawMessageChannel
public MessageChannel createRawMessageChannel(Hop hop)(Code)
Creates a raw message channel. A raw message channel has no transaction wrapper.
Parameters:
  hop - hop for which to create the raw message channel. the requested message channel



createServerTransaction
public ServerTransaction createServerTransaction(MessageChannel encapsulatedMessageChannel)(Code)
Creates a server transaction that encapsulates a MessageChannel. Useful for implementations that want to subclass the standard
Parameters:
  encapsulatedMessageChannel - Message channel of the transport layer. the requested server transaction



findCancelTransaction
public Transaction findCancelTransaction(Request cancelRequest, boolean isServer)(Code)
Gets the transaction to cancel. Search the server transaction table for a transaction that matches the given transaction.
Parameters:
  cancelRequest - the request to be found
Parameters:
  isServer - true if this is a server request the transaction object requested



findSubscribeTransaction
public ClientTransaction findSubscribeTransaction(Request notifyMessage)(Code)
Finds a matching client SUBSCRIBE to the incoming notify. NOTIFY requests are matched to such SUBSCRIBE requests if they contain the same "Call-ID", a "ToHeader" header "tag" parameter which matches the "FromHeader" header "tag" parameter of the SUBSCRIBE, and the same "Event" header field. Rules for comparisons of the "Event" headers are described in section 7.2.1. If a matching NOTIFY request contains a "Subscription-State" of "active" or "pending", it creates a new subscription and a new dialog (unless they have already been created by a matching response, as described above).
Parameters:
  notifyMessage - the request to be matched the new client transaction object



findTransaction
public Transaction findTransaction(Message sipMessage, boolean isServer)(Code)
Finds the transaction corresponding to a given request.
Parameters:
  sipMessage - request for which to retrieve the transaction.
Parameters:
  isServer - search the server transaction table if true. the transaction object corresponding to the request or nullif no such mapping exists.



getDialog
public Dialog getDialog(String dialogId)(Code)
Returns the dialog for a given dialog ID. If compatibility is enabled then we do not assume the presence of tags and hence need to add a flag to indicate whether this is a server or client transaction.
Parameters:
  dialogId - is the dialog id to check. the Dialog object for the requested id



isDialogCreated
public boolean isDialogCreated(String method)(Code)
Returns true if extension is supported.
Parameters:
  method - the name of the method used for create true if extension is supported and false otherwise.



newSIPServerRequest
protected SIPServerRequestInterface newSIPServerRequest(Request requestReceived, MessageChannel requestMessageChannel)(Code)
Handles a new SIP request. It finds a server transaction to handle this message. If none exists, it creates a new transaction.
Parameters:
  requestReceived - Request to handle.
Parameters:
  requestMessageChannel - Channel that received message. A server transaction.



newSIPServerResponse
SIPServerResponseInterface newSIPServerResponse(Response responseReceived, MessageChannel responseMessageChannel)(Code)
Handles a new SIP response. It finds a client transaction to handle this message. If none exists, it sends the message directly to the superclass.
Parameters:
  responseReceived - Response to handle.
Parameters:
  responseMessageChannel - Channel that received message. A client transaction.



putDialog
public void putDialog(Dialog dialog)(Code)
Puts a dialog into the dialog table.
Parameters:
  dialog - -- dialog to put into the dialog table.



Fields inherited from gov.nist.siplite.stack.SIPMessageStack
protected String badMessageLog(Code)(Java Doc)
protected boolean debugFlag(Code)(Java Doc)
protected int maxConnections(Code)(Java Doc)
protected int outboundPort(Code)(Java Doc)
protected String outboundProxy(Code)(Java Doc)
protected Router router(Code)(Java Doc)
protected SecurityToken securityToken(Code)(Java Doc)
protected SIPStackMessageFactory sipMessageFactory(Code)(Java Doc)
protected String stackAddress(Code)(Java Doc)
protected String stackName(Code)(Java Doc)
protected boolean tcpFlag(Code)(Java Doc)
protected int threadPoolSize(Code)(Java Doc)
protected boolean toExit(Code)(Java Doc)
protected boolean udpFlag(Code)(Java Doc)

Methods inherited from gov.nist.siplite.stack.SIPMessageStack
public void addMessageProcessor(MessageProcessor newMessageProcessor) throws IOException(Code)(Java Doc)
public MessageChannel createMessageChannel(Hop nextHop)(Code)(Java Doc)
public MessageProcessor createMessageProcessor(int port, String transport) throws java.io.IOException, IllegalArgumentException(Code)(Java Doc)
public String getBadMessageLog()(Code)(Java Doc)
public Hop getDefaultRoute()(Code)(Java Doc)
public RouteHeader getDefaultRouteHeader()(Code)(Java Doc)
public String getHostAddress()(Code)(Java Doc)
public MessageProcessor getMessageProcessor(String transport)(Code)(Java Doc)
public Vector getMessageProcessors()(Code)(Java Doc)
public Hop getNextHop()(Code)(Java Doc)
public int getPort(String transport) throws IllegalArgumentException(Code)(Java Doc)
public RouteHeader getRouteHeader(Hop hop)(Code)(Java Doc)
public Router getRouter()(Code)(Java Doc)
protected SecurityToken getSecurityToken()(Code)(Java Doc)
public String getStackName()(Code)(Java Doc)
public synchronized boolean isAlive()(Code)(Java Doc)
public boolean isTransportEnabled(String transport)(Code)(Java Doc)
public boolean isTransportEnabled(String transport, int port)(Code)(Java Doc)
public void logBadMessage(String message)(Code)(Java Doc)
protected SIPServerRequestInterface newSIPServerRequest(Request siprequest, MessageChannel msgchan)(Code)(Java Doc)
SIPServerResponseInterface newSIPServerResponse(Response sipresponse, MessageChannel msgchan)(Code)(Java Doc)
public void removeMessageProcessor(MessageProcessor oldMessageProcessor)(Code)(Java Doc)
public void setHostAddress(String stackAddress)(Code)(Java Doc)
public void setMaxConnections(int nconnections)(Code)(Java Doc)
protected void setMessageFactory(SIPStackMessageFactory messageFactory)(Code)(Java Doc)
public void setRouter(Router router)(Code)(Java Doc)
protected void setSecurityToken(SecurityToken token)(Code)(Java Doc)
public void setSingleThreaded()(Code)(Java Doc)
public void setStackMessageFactory(SIPStackMessageFactory messageFactory)(Code)(Java Doc)
public void setStackName(String stackName)(Code)(Java Doc)
public void setThreadPoolSize(int size)(Code)(Java Doc)
public void stopStack()(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.