|
xmlBlaster 2.2.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.topic.TestTopicHistory
public class TestTopicHistory
Here we test access to history messages of a topic.
Invoke examples:
java junit.textui.TestRunner org.xmlBlaster.test.topic.TestTopicHistory java junit.swingui.TestRunner -noloading org.xmlBlaster.test.topic.TestTopicHistory
TopicHandler
Field Summary | |
---|---|
private long |
blockUpdateTime
|
private I_XmlBlasterAccess |
con
|
private Global |
glob
|
private static java.util.logging.Logger |
log
|
private int |
numReceived
|
private java.lang.String |
publishOid
|
private java.lang.String |
senderContent
|
private int |
serverPort
|
private EmbeddedXmlBlaster |
serverThread
|
private boolean |
startEmbedded
|
private SubscribeReturnQos |
subscribeReturnQos
|
Constructor Summary | |
---|---|
TestTopicHistory(Global glob,
java.lang.String testName)
Constructs the TestTopicHistory object. |
Method Summary | |
---|---|
void |
createTopic(java.lang.String keyOid,
TopicProperty topicProperty)
Create a topic. |
static void |
main(java.lang.String[] args)
Invoke: java org.xmlBlaster.test.topic.TestTopicHistory -startEmbedded false |
EraseReturnQos[] |
sendErase(boolean forceDestroy)
|
void |
sendExpiringMsg(boolean initializeTopic,
long topicDestroyDelay,
long msgLifeTime)
Publish an almost volatile message. |
protected void |
setUp()
Sets up the fixture. |
void |
subscribeMsg()
Subscribe a volatile message. |
static junit.framework.Test |
suite()
Method is used by TestRunner to load these tests |
protected void |
tearDown()
Tears down the fixture. |
void |
testHistory()
|
void |
unSubscribeMsg()
unSubscribe a message. |
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
This is the callback method invoked from xmlBlaster delivering us a new asynchronous message. |
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 final Global glob
private static java.util.logging.Logger log
private I_XmlBlasterAccess con
private java.lang.String senderContent
private java.lang.String publishOid
private SubscribeReturnQos subscribeReturnQos
private long blockUpdateTime
private EmbeddedXmlBlaster serverThread
private int serverPort
private boolean startEmbedded
private int numReceived
Constructor Detail |
---|
public TestTopicHistory(Global glob, java.lang.String testName)
testName
- The name used in the test suiteloginName
- The name to login to the xmlBlasterMethod Detail |
---|
protected void setUp()
setUp
in class junit.framework.TestCase
protected void tearDown()
tearDown
in class junit.framework.TestCase
public EraseReturnQos[] sendErase(boolean forceDestroy)
public void createTopic(java.lang.String keyOid, TopicProperty topicProperty)
public void sendExpiringMsg(boolean initializeTopic, long topicDestroyDelay, long msgLifeTime)
public void subscribeMsg()
public void unSubscribeMsg()
public void testHistory()
public java.lang.String update(java.lang.String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos)
update
in interface I_Callback
cbSessionId
- The session ID specified by the client which registered the callback.
You can specify a cbSessionId during connection (with ConnectQos)
and this is bounced back here so you can authenticate the message.updateKey
- The arrived key containing the topic namecontent
- The arrived message content. This is your payload.I_Callback.update(String, UpdateKey, byte[], UpdateQos)
public static junit.framework.Test suite()
public static void main(java.lang.String[] args)
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |