Java Doc for EncryptMessageOrderTestCase.java in  » Net » JGroups-2.4.1-sp3 » org » jgroups » tests » 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 » Net » JGroups 2.4.1 sp3 » org.jgroups.tests 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jgroups.tests.EncryptMessageOrderTestCase

EncryptMessageOrderTestCase
public class EncryptMessageOrderTestCase extends TestCase (Code)
This test case checks ordering of messages using the Encrypt protocol using UDPprotocols. It can be run as JUnit test case or in the command line. Parameters are:
  • -sleep n - means that after each message sending, sender thread will sleep for n milliseconds;
  • -msg_num n - n is number of messages to send;
  • -debug - pop-up protocol debugger;
  • -cummulative - debugger shows cummulative messages.
$Id: EncryptMessageOrderTestCase.java,v 1.1.14.1 2007/04/26 21:32:06 vlada Exp $

Inner Class :public static class EncryptOrderTestHeader extends Header

Field Summary
public static  booleanCUMMULATIVE
    
public static  intMESSAGE_NUMBER
    
public static  booleanSLEEP_BETWEEN_SENDING
    
public static  intSLEEP_TIME
    
public static  booleanUSE_DEBUGGER
    
protected  PullPushAdapteradapter1
    
protected  PullPushAdapteradapter2
    
protected  JChannelchannel1
    
protected  JChannelchannel2
    
protected  Debuggerdebugger1
    
protected  Debuggerdebugger2
    
protected  booleanfinishedReceiving
    
 StringgroupName
    
protected  Loglog
    
 booleanorderCounterFailure
    
final public static  Stringproperties
    

Constructor Summary
public  EncryptMessageOrderTestCase(String string)
     Constructor to create test case.

Method Summary
static  voidhelp()
    
public static  voidmain(String[] args)
     Main method to start a test case from the command line.
protected static  voidprintSelectedOptions()
     Print selected options before test starts.
protected  voidsetUp()
     Set up unit test.
protected  voidtearDown()
     Tears down test case.
public  voidtestLoad()
     Test method.

Field Detail
CUMMULATIVE
public static boolean CUMMULATIVE(Code)



MESSAGE_NUMBER
public static int MESSAGE_NUMBER(Code)



SLEEP_BETWEEN_SENDING
public static boolean SLEEP_BETWEEN_SENDING(Code)



SLEEP_TIME
public static int SLEEP_TIME(Code)



USE_DEBUGGER
public static boolean USE_DEBUGGER(Code)



adapter1
protected PullPushAdapter adapter1(Code)



adapter2
protected PullPushAdapter adapter2(Code)



channel1
protected JChannel channel1(Code)



channel2
protected JChannel channel2(Code)



debugger1
protected Debugger debugger1(Code)



debugger2
protected Debugger debugger2(Code)



finishedReceiving
protected boolean finishedReceiving(Code)



groupName
String groupName(Code)



log
protected Log log(Code)



orderCounterFailure
boolean orderCounterFailure(Code)



properties
final public static String properties(Code)




Constructor Detail
EncryptMessageOrderTestCase
public EncryptMessageOrderTestCase(String string)(Code)
Constructor to create test case.




Method Detail
help
static void help()(Code)



main
public static void main(String[] args)(Code)
Main method to start a test case from the command line. Parameters are:
  • -sleep n - means that after each message sending, sender thread will sleep for n milliseconds;
  • -msg_num n - n is number of messages to send;;
  • -debug - pop-up protocol debugger;
  • -cummulative - debugger shows cummulative messages.



printSelectedOptions
protected static void printSelectedOptions()(Code)
Print selected options before test starts.



setUp
protected void setUp() throws Exception(Code)
Set up unit test. It might add protocol stack debuggers if such option was selected at startup.



tearDown
protected void tearDown() throws Exception(Code)
Tears down test case. This method closes all opened channels.



testLoad
public void testLoad()(Code)
Test method. This method adds a message listener to the PullPushAdapter on channel 1, and starts sending specified number of messages into channel 1 or 2 depending if we are in loopback mode or not. Each message containg timestamp when it was created. By measuring time on message delivery we can calculate message trip time. Listener is controlled by two string messages "start" and "stop". After sender has finished to send messages, it waits until listener receives all messages or "stop" message. Then test is finished and calculations are showed.

Also we calculate how much memory was allocated before excuting a test and after executing a test.




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.