|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.test.util.Client
| Field Summary | |
private I_XmlBlasterAccess |
accessor
|
private boolean |
consumable
|
private Global |
global
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
private java.lang.String |
name
|
private java.lang.String |
publishOid
|
private java.util.ArrayList |
responses
|
private java.lang.String |
subscribeOid
|
private XmlBlasterException |
updateException
|
| Constructor Summary | |
Client(Global global,
java.lang.String name,
java.util.ArrayList responses)
A helper client to be used when testing |
|
| Method Summary | |
void |
init(java.lang.String publishOid,
java.lang.String subscribeOid,
boolean consumable,
int session)
Initializes this client which either can be a publisher, a subscriber or both depending on the parameters passed here. |
void |
publish(java.lang.String content)
Publishes one entry on the oid specified by the init method. |
void |
setUpdateException(XmlBlasterException ex)
Sets an exception to be thrown the next time an update event comes. |
void |
shutdown(boolean doEraseTopic)
Disconnect the client from xmlBlaster with an optional previous deletion of the publishing topic. |
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
Enforced by I_Callback. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String ME
private Global global
private static java.util.logging.Logger log
private I_XmlBlasterAccess accessor
private java.lang.String name
private java.lang.String publishOid
private java.lang.String subscribeOid
private boolean consumable
private java.util.ArrayList responses
private XmlBlasterException updateException
| Constructor Detail |
public Client(Global global,
java.lang.String name,
java.util.ArrayList responses)
global - name - the name to be given to this instanceresponses - the ArrayList object to which to add an entry (the name) when an update
happens. You can pass 'null' here and nobody will be notified.| Method Detail |
public void init(java.lang.String publishOid,
java.lang.String subscribeOid,
boolean consumable,
int session)
throws XmlBlasterException
publishOid - The oid to which to publish messages. If you pass 'null', then no message
will be published by this instance.subscribeOid - the oid to which to subscribe. If you pass null here no
subscription will be node.consumable - if this flag is set to true, then the publishing oid will be
consumable, otherwise it is a normal (non consumable) topic.session - the session of this instance as an integer (either positive or negative).
XmlBlasterException
public void publish(java.lang.String content)
throws XmlBlasterException
content - the content of the message to send (a string).
XmlBlasterException
public void shutdown(boolean doEraseTopic)
throws XmlBlasterException
doEraseTopic - if true, the topic on which this client publishes is erased. If this
client is not a publisher, then erase will not be done.
XmlBlasterExceptionpublic void setUpdateException(XmlBlasterException ex)
ex -
public java.lang.String update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
throws XmlBlasterException
update in interface I_CallbackcbSessionId - updateKey - content - updateQos -
XmlBlasterExceptionI_XmlBlasterAccess
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||