|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.xmlBlaster.test.client.TestXmlBlasterAccessMultiThreaded
public class TestXmlBlasterAccessMultiThreaded
Tests the thread safety of the I_XmlBlasterAccess client helper class
Invoke examples:
java junit.textui.TestRunner -noloading org.xmlBlaster.test.client.TestXmlBlasterAccessMultiThreaded java junit.swingui.TestRunner -noloading org.xmlBlaster.test.client.TestXmlBlasterAccessMultiThreaded
I_XmlBlasterAccess| Nested Class Summary | |
|---|---|
(package private) class |
TestXmlBlasterAccessMultiThreaded.PublishThread
Helper class for publisher threads |
| Field Summary | |
|---|---|
private I_XmlBlasterAccess |
con
|
private java.lang.String |
contentMime
|
private Global |
glob
|
private int |
iThread
|
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
private int |
numPublish
|
private int |
numStart
|
private int |
numStop
|
private long |
reconnectDelay
|
private java.lang.String |
senderName
|
private int |
serverPort
|
private EmbeddedXmlBlaster |
serverThread
|
private MsgInterceptor |
updateInterceptor
|
| Constructor Summary | |
|---|---|
TestXmlBlasterAccessMultiThreaded(Global glob,
java.lang.String testName)
|
|
TestXmlBlasterAccessMultiThreaded(java.lang.String testName)
|
|
| Method Summary | |
|---|---|
MsgUnit |
doPublish(java.lang.String oid,
java.lang.String content)
TEST: Construct a message and publish it. |
void |
doSubscribe()
TEST: Subscribe to messages with XPATH. |
static void |
main(java.lang.String[] args)
Deprecated. Use the TestRunner from the testsuite to run it: java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.client.TestXmlBlasterAccessMultiThreaded |
void |
reachedAlive(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
This is the callback method invoked from I_XmlBlasterAccess informing the client in an asynchronous mode if the connection was established. |
void |
reachedAliveSync(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
Invoked when the dispatcher goes to synch again after having delivered entries which where in the queue when the state changed to ALIVE. |
void |
reachedDead(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess informing the client that the connection was lost (i.e. |
void |
reachedPolling(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess informing the client that the connection state has changed to POLLING. |
protected void |
setUp()
Sets up the fixture. |
protected void |
tearDown()
Tears down the fixture. |
void |
testPublishThreads()
TEST: |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static java.lang.String ME
private Global glob
private static java.util.logging.Logger log
private int serverPort
private EmbeddedXmlBlaster serverThread
private MsgInterceptor updateInterceptor
private I_XmlBlasterAccess con
private java.lang.String senderName
private int numPublish
private int numStop
private int numStart
private int iThread
private final java.lang.String contentMime
private final long reconnectDelay
| Constructor Detail |
|---|
public TestXmlBlasterAccessMultiThreaded(java.lang.String testName)
public TestXmlBlasterAccessMultiThreaded(Global glob,
java.lang.String testName)
| Method Detail |
|---|
protected void setUp()
setUp in class junit.framework.TestCaseprotected void tearDown()
tearDown in class junit.framework.TestCasepublic void doSubscribe()
public MsgUnit doPublish(java.lang.String oid,
java.lang.String content)
throws XmlBlasterException
XmlBlasterExceptionpublic void testPublishThreads()
public void reachedAlive(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
reachedAlive in interface I_ConnectionStateListeneroldState - The previous state of the connection.
public void reachedAliveSync(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListener
reachedAliveSync in interface I_ConnectionStateListeneroldState - is always ALIVE.
public void reachedPolling(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListener
reachedPolling in interface I_ConnectionStateListeneroldState - The previous state of the connection.
public void reachedDead(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListener
reachedDead in interface I_ConnectionStateListeneroldState - The previous state of the connection.public static void main(java.lang.String[] args)
java -Djava.compiler= junit.textui.TestRunner org.xmlBlaster.test.client.TestXmlBlasterAccessMultiThreaded
|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||