| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.semaine.jms.IOBase
eu.semaine.jms.sender.Sender
eu.semaine.jms.sender.XMLSender
public class XMLSender
An abstraction of Sender for feature vectors.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class eu.semaine.jms.IOBase | 
|---|
| IOBase.Event | 
| Field Summary | 
|---|
| Fields inherited from class eu.semaine.jms.sender.Sender | 
|---|
| datatype, period, producer, source | 
| Fields inherited from class eu.semaine.jms.IOBase | 
|---|
| connection, isConnectionStarted, jmsPassword, jmsUrl, jmsUser, session, topic | 
| Constructor Summary | |
|---|---|
| XMLSender(java.lang.String topicName,
          java.lang.String datatype,
          java.lang.String source)Create a new Sender to the given topic on the default JMS server. | |
| XMLSender(java.lang.String jmsUrl,
          java.lang.String jmsUser,
          java.lang.String jmsPassword,
          java.lang.String topicName,
          java.lang.String datatype,
          java.lang.String source)Create a new Sender to the given topic on the given JMS server. | |
| Method Summary | |
|---|---|
| protected  void | fillMessageProperties(javax.jms.Message message,
                      long usertime)Fill in the usual message properties as far as possible. | 
|  void | sendXML(org.w3c.dom.Document document,
        long usertime)Send an XML document as a "single" event. | 
|  void | sendXML(org.w3c.dom.Document document,
        long usertime,
        IOBase.Event event)Send an XML document with the given event tag. | 
|  void | sendXML(org.w3c.dom.Document document,
        long usertime,
        IOBase.Event event,
        java.lang.String contentID,
        long contentCreationTime)Send an XML document with the given event tag. | 
|  void | sendXML(org.w3c.dom.Document document,
        long usertime,
        java.lang.String contentID,
        long contentCreationTime)Send an XML document as a "single" event. | 
| Methods inherited from class eu.semaine.jms.sender.Sender | 
|---|
| fillMessageProperties, getDatatype, getPeriod, getSource, getTimeToLive, initialise, isEventBased, isPeriodic, main, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, setEventBased, setPeriodic, setTimeToLive | 
| Methods inherited from class eu.semaine.jms.IOBase | 
|---|
| getConnection, getJMSUrl, getSession, getTopic, getTopicName, startConnection | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public XMLSender(java.lang.String topicName,
                 java.lang.String datatype,
                 java.lang.String source)
          throws javax.jms.JMSException,
                 SystemConfigurationException
jms.url, default value tcp://localhost:61616;jms.user, default value null;jms.password, default value null.
topic - the name of the topic to send to.datatype - the name of the type of data being sent.source - the name of the component sending the data.
java.lang.NullPointerException - if any of the parameters topicName, datatype, or source are null.
java.lang.IllegalArgumentException - if period is <= 0.
javax.jms.JMSException
SystemConfigurationException
public XMLSender(java.lang.String jmsUrl,
                 java.lang.String jmsUser,
                 java.lang.String jmsPassword,
                 java.lang.String topicName,
                 java.lang.String datatype,
                 java.lang.String source)
          throws javax.jms.JMSException
jmsUrl - the url where to contact the JMS serverjmsUser - the username to use (can be null)jmsPassword - the password to use (can be null)topic - the name of the topic to send to.datatype - the name of the type of data being sent.source - the name of the component sending the data.
javax.jms.JMSException
java.lang.NullPointerException - if any of the parameters jmsUrl, topicName, datatype, or source are null.
java.lang.IllegalArgumentException - if period is <= 0.| Method Detail | 
|---|
public void sendXML(org.w3c.dom.Document document,
                    long usertime)
             throws javax.jms.JMSException
document - the document to send.usertime - the "user" time at which this message is being sent,
 in milliseconds since system startup.
javax.jms.JMSException
public void sendXML(org.w3c.dom.Document document,
                    long usertime,
                    java.lang.String contentID,
                    long contentCreationTime)
             throws javax.jms.JMSException
document - the document to send.usertime - the "user" time at which this message is being sent,
 in milliseconds since system startup.contentID - a unique identifier for the message's content.
 If this is not null, it will cause the addition of the String property content-id in the message.contentCreationTime - the time when the content in this message was created.
 If this is not negative, it will cause the addition of the Long property content-creation-time in the message.
javax.jms.JMSException
public void sendXML(org.w3c.dom.Document document,
                    long usertime,
                    IOBase.Event event)
             throws javax.jms.JMSException
document - the document to send.usertime - the "user" time at which this message is being sent,
 in milliseconds since system startup.event - the kind of event represented by this message
javax.jms.JMSException
java.lang.NullPointerException - if document or event is null
java.lang.IllegalStateException - if the sender is set to periodic mode.
public void sendXML(org.w3c.dom.Document document,
                    long usertime,
                    IOBase.Event event,
                    java.lang.String contentID,
                    long contentCreationTime)
             throws javax.jms.JMSException
document - the document to send.usertime - the "user" time at which this message is being sent,
 in milliseconds since system startup.event - the kind of event represented by this messagecontentID - a unique identifier for the message's content.
 If this is not null, it will cause the addition of the String property content-id in the message.contentCreationTime - the time when the content in this message was created.
 If this is not negative, it will cause the addition of the Long property content-creation-time in the message.
javax.jms.JMSException
java.lang.NullPointerException - if document or event is null
java.lang.IllegalStateException - if the sender is set to periodic mode.
protected void fillMessageProperties(javax.jms.Message message,
                                     long usertime)
                              throws javax.jms.JMSException
Sendersuper.fillMessageProperties(message, usertime)).
fillMessageProperties in class Senderusertime - the "user" time at which this message is being sent,
 in milliseconds since system startup.
javax.jms.JMSException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||