Java Doc for MessageFlowHarness.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » test » tck » msgflow » 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 » test.tck.msgflow 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


test.tck.TestHarness
   test.tck.msgflow.MessageFlowHarness

All known Subclasses:   test.tck.msgflow.SipProviderTest,  test.tck.msgflow.NonInviteServerTransactionsStateMachineTest,  test.tck.msgflow.ClientTransactionTest,  test.tck.msgflow.DialogTest,  test.tck.msgflow.InviteServerTransactionsStateMachineTest,  test.tck.msgflow.TransactionTimeoutEventTest,  test.tck.msgflow.DialogStateMachineTest,  test.tck.msgflow.NonInviteClientTransactionsStateMachineTest,  test.tck.msgflow.InviteClientTransactionsStateMachineTest,  test.tck.msgflow.ServerTransactionTest,
MessageFlowHarness
public class MessageFlowHarness extends TestHarness (Code)

Title: TCK

Description: JAIN SIP 1.1 Technology Compatibility Kit


author:
   Emil Ivov Network Research Team, Louis Pasteur University,
author:
   Strasbourg, France
author:
   Ivelin Ivanov
version:
   1.0


Field Summary
final protected static  StringEXTENSION_HDR
    
protected static  longMESSAGES_ARRIVE_FOR
    
protected static  intRETRY_OBJECT_DELETES
    
protected static  longRETRY_OBJECT_DELETES_AFTER
    
protected static  longSTACKS_SHUT_DOWN_FOR
    
protected static  longSTACKS_START_FOR
    
protected static  longTRANSACTION_TIMES_OUT_FOR
    
protected static  intcounter
    
protected  SipEventCollectoreventCollector
    
protected  ListeningPointriListeningPoint
    
protected  SipProviderriSipProvider
    
protected  SipStackriSipStack
    
protected  ListeningPointtiListeningPoint
    
protected  SipProvidertiSipProvider
    
protected  SipStacktiSipStack
    

Constructor Summary
public  MessageFlowHarness(String name)
    
protected  MessageFlowHarness(String name, boolean autoDialog)
    

Method Summary
protected  voidaddStatus(HeaderFactory headerFactory, Request request)
    
protected  voidaddStatus(Request request, Response response)
    
protected  RequestcreateRequest(String method, AddressFactory addressFactory, HeaderFactory headerFactory, MessageFactory messageFactory, SipProvider srcProvider, SipProvider dstProvider, String contentType, String contentSubType, Object content)
     Creates a SipRequest using the specified factories.
public  ContactHeadercreateRiContact()
     Add a contact for the TI.
protected  RequestcreateRiInviteRequest(String contentType, String contentSubType, Object content)
     Creates an invite request object using the RI.
protected  RequestcreateRiRegisterRequest()
     Creates a register request object using the RI.
public  ContactHeadercreateTiContact()
     Add a contact for the TI.
protected  RequestcreateTiInviteRequest(String contentType, String contentSubType, Object content)
     Creates an invite request object using the TI.
protected  RequestcreateTiRegisterRequest()
     Creates a register request object using the TI.
public  voidsetUp()
     Initialises both RI and TI sip stacks and stack factories.
protected static  voidsleep(long sleepFor)
     Waits during _no_less_ than sleepFor milliseconds.
public  voidtearDown()
     Sets all JAIN SIP objects to null and resets the SipFactory.
public static  voidwaitForMessage()
     Waits during LISTEN_TIMEOUT milliseconds.
protected static  voidwaitForTimeout()
     Wait till a transaction times out.
protected static  voidwaitShortForMessage()
     waits a good long time for messages.

Field Detail
EXTENSION_HDR
final protected static String EXTENSION_HDR(Code)



MESSAGES_ARRIVE_FOR
protected static long MESSAGES_ARRIVE_FOR(Code)



RETRY_OBJECT_DELETES
protected static int RETRY_OBJECT_DELETES(Code)



RETRY_OBJECT_DELETES_AFTER
protected static long RETRY_OBJECT_DELETES_AFTER(Code)



STACKS_SHUT_DOWN_FOR
protected static long STACKS_SHUT_DOWN_FOR(Code)



STACKS_START_FOR
protected static long STACKS_START_FOR(Code)



TRANSACTION_TIMES_OUT_FOR
protected static long TRANSACTION_TIMES_OUT_FOR(Code)



counter
protected static int counter(Code)



eventCollector
protected SipEventCollector eventCollector(Code)



riListeningPoint
protected ListeningPoint riListeningPoint(Code)



riSipProvider
protected SipProvider riSipProvider(Code)



riSipStack
protected SipStack riSipStack(Code)



tiListeningPoint
protected ListeningPoint tiListeningPoint(Code)



tiSipProvider
protected SipProvider tiSipProvider(Code)



tiSipStack
protected SipStack tiSipStack(Code)




Constructor Detail
MessageFlowHarness
public MessageFlowHarness(String name)(Code)



MessageFlowHarness
protected MessageFlowHarness(String name, boolean autoDialog)(Code)




Method Detail
addStatus
protected void addStatus(HeaderFactory headerFactory, Request request)(Code)



addStatus
protected void addStatus(Request request, Response response)(Code)



createRequest
protected Request createRequest(String method, AddressFactory addressFactory, HeaderFactory headerFactory, MessageFactory messageFactory, SipProvider srcProvider, SipProvider dstProvider, String contentType, String contentSubType, Object content) throws Exception(Code)
Creates a SipRequest using the specified factories. The request has the specified method and is meant to be sent from srcProvider to dstProvider. This method is prefered to manual creation of requests as it helps avoid using RI objects instead of corresponding TI objects (or vice versa).
Parameters:
  method - the request's method
Parameters:
  addressFactory - the address factory to use when creating addresses
Parameters:
  headerFactory - the header factory to use when creating headers
Parameters:
  messageFactory - the message factory to use when creating headers
Parameters:
  srcProvider - the provider that will eventually be used to send the request
Parameters:
  dstProvider - the provider that will eventually dispatch the request to aSipListener
Parameters:
  contentType - if the content parameter is not null then this is its contenttype.
Parameters:
  contentSubType - if the content parameter is not null then this is its subcontent type.
Parameters:
  content - the content of the request. if null this parameter is ignored a request generated by the specified factories and destined to gofrom srcProvider to dstProvider
throws:
  Exception - if anything should go wrong. further exception handling isleft to calling methods (or JUnit).



createRiContact
public ContactHeader createRiContact() throws TckInternalError(Code)
Add a contact for the TI.



createRiInviteRequest
protected Request createRiInviteRequest(String contentType, String contentSubType, Object content) throws TckInternalError(Code)
Creates an invite request object using the RI. This invite request is meant to be sent to the TI
Parameters:
  contentType - if the content parameter is not null then this is its contenttype.
Parameters:
  contentSubType - if the content parameter is not null then this is its contentsub type.
Parameters:
  content - if the request is to have any content then this parameter isused to set it. Th content parameter is to be left to null ifthe request won't have any content. an RI->TI invite request
throws:
  TckInternalError - if anything should gou wrong.



createRiRegisterRequest
protected Request createRiRegisterRequest() throws TckInternalError(Code)
Creates a register request object using the RI. This register request is meant to be sent to the TI an RI->TI register request
throws:
  TckInternalError - if anything should gou wrong.



createTiContact
public ContactHeader createTiContact() throws Exception(Code)
Add a contact for the TI.



createTiInviteRequest
protected Request createTiInviteRequest(String contentType, String contentSubType, Object content) throws TiUnexpectedError(Code)
Creates an invite request object using the TI. This invite request is meant to be sent to the RI
Parameters:
  contentType - if the content parameter is not null then this is its contenttype.
Parameters:
  contentSubType - if the content parameter is not null then this is its contentsub type.
Parameters:
  content - if the request is to have any content then this parameter isused to set it. Th content parameter is to be left to null ifthe request won't have any content. an TI->RI invite request
throws:
  TiUnexpectedError - if anything should gou wrong.



createTiRegisterRequest
protected Request createTiRegisterRequest() throws TiUnexpectedError(Code)
Creates a register request object using the TI. This register request is meant to be sent to the RI a TI->RI register request
throws:
  TiUnexpectedError - if anything should gou wrong.



setUp
public void setUp() throws java.lang.Exception(Code)
Initialises both RI and TI sip stacks and stack factories.
throws:
  java.lang.Exception - All Let all exceptions that come from the underlying stack topass through and surface at JUnit Level.



sleep
protected static void sleep(long sleepFor)(Code)
Waits during _no_less_ than sleepFor milliseconds. Had to implement it on top of Thread.sleep() to guarantee minimum sleep time.
Parameters:
  sleepFor - the number of miliseconds to wait



tearDown
public void tearDown() throws java.lang.Exception(Code)
Sets all JAIN SIP objects to null and resets the SipFactory.
throws:
  java.lang.Exception -



waitForMessage
public static void waitForMessage()(Code)
Waits during LISTEN_TIMEOUT milliseconds. This method is called after a message has been sent so that it has the time to propagate though the sending and receiving stack



waitForTimeout
protected static void waitForTimeout()(Code)
Wait till a transaction times out.



waitShortForMessage
protected static void waitShortForMessage()(Code)
waits a good long time for messages.



Fields inherited from test.tck.TestHarness
final protected static String ABORT_ON_FAIL(Code)(Java Doc)
final protected static String IMPLEMENTATION_PATH(Code)(Java Doc)
final protected static String LOCAL_ADDRESS(Code)(Java Doc)
final protected static String LOG_FILE_NAME(Code)(Java Doc)
final protected static int RI_PORT(Code)(Java Doc)
final protected static int TI_PORT(Code)(Java Doc)
protected static boolean abortOnFail(Code)(Java Doc)
protected static Appender console(Code)(Java Doc)
protected static String logFileName(Code)(Java Doc)
protected static String path(Code)(Java Doc)
protected static PrintWriter printWriter(Code)(Java Doc)
protected static AddressFactory riAddressFactory(Code)(Java Doc)
protected static SipFactory riFactory(Code)(Java Doc)
protected static HeaderFactory riHeaderFactory(Code)(Java Doc)
protected static MessageFactory riMessageFactory(Code)(Java Doc)
protected static int testCounter(Code)(Java Doc)
protected TestResult testResult(Code)(Java Doc)
protected static AddressFactory tiAddressFactory(Code)(Java Doc)
protected static SipFactory tiFactory(Code)(Java Doc)
protected static HeaderFactory tiHeaderFactory(Code)(Java Doc)
protected static MessageFactory tiMessageFactory(Code)(Java Doc)

Methods inherited from test.tck.TestHarness
public static void assertEquals(Object me, Object him)(Code)(Java Doc)
public static void assertEquals(String me, String him)(Code)(Java Doc)
public static void assertEquals(String reason, Object me, Object him)(Code)(Java Doc)
public static void assertEquals(String reason, String me, String him)(Code)(Java Doc)
public static void assertNotNull(String reason, Object thing)(Code)(Java Doc)
public static void assertNull(String reason, Object thing)(Code)(Java Doc)
public static void assertSame(String diagnostic, Object thing, Object thingie)(Code)(Java Doc)
public static void assertTrue(boolean cond)(Code)(Java Doc)
public static void assertTrue(String diagnostic, boolean cond)(Code)(Java Doc)
public static void checkImplementsInterface(Class implementationClass, Class jainInterface)(Code)(Java Doc)
public static void fail(String message)(Code)(Java Doc)
public static void fail(String message, Exception ex)(Code)(Java Doc)
public static void fail()(Code)(Java Doc)
protected String getImplementationPath()(Code)(Java Doc)
public static Properties getRiProperties(boolean autoDialog)(Code)(Java Doc)
public static Properties getTiProperties()(Code)(Java Doc)
public static boolean implementsInterface(Class implementationClass, Class jainInterface)(Code)(Java Doc)
public void logTestCompleted()(Code)(Java Doc)
public void logTestCompleted(String info)(Code)(Java Doc)
public void setUp() throws Exception(Code)(Java Doc)
public void tearDown() throws Exception(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.