|
||||||||||
| 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.FeatureSender
public class FeatureSender
An abstraction of Sender for feature vectors.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class eu.semaine.jms.IOBase |
|---|
IOBase.ConnectionStatus, IOBase.Event |
| Field Summary | |
|---|---|
protected java.lang.String[] |
featureNames
|
| Fields inherited from class eu.semaine.jms.sender.Sender |
|---|
datatype, period, producer, source |
| Fields inherited from class eu.semaine.jms.IOBase |
|---|
connection, exception, isConnectionStarted, jmsPassword, jmsUrl, jmsUser, session, topic, topicName |
| Constructor Summary | |
|---|---|
FeatureSender(java.lang.String topicName,
java.lang.String datatype,
java.lang.String source)
Create a new event-based FeatureSender to the given topic on the default JMS server. |
|
FeatureSender(java.lang.String topicName,
java.lang.String datatype,
java.lang.String source,
int period)
Create a new periodic FeatureSender to the given topic on the default JMS server. |
|
FeatureSender(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 event-based FeatureSender to the given topic on the given JMS server. |
|
FeatureSender(java.lang.String jmsUrl,
java.lang.String jmsUser,
java.lang.String jmsPassword,
java.lang.String topicName,
java.lang.String datatype,
java.lang.String source,
int period)
Create a new periodic FeatureSender to the given topic on the given JMS server. |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getFeatureNames()
Provides access to the array of feature names. |
protected void |
sendBinaryFeatureVector(float[] features,
long usertime)
For periodic messages |
protected void |
sendBinaryFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
For event-based messages |
void |
sendFeatureVector(float[] features,
long usertime)
Send a vector of float features as a text message. |
void |
sendFeatureVector(float[] features,
long usertime,
boolean sendBinary)
Send a vector of float features. |
void |
sendFeatureVector(float[] features,
long usertime,
boolean sendBinary,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime)
Send a vector of float features. |
void |
sendFeatureVector(float[] features,
long usertime,
boolean sendBinary,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
Send a vector of float features. |
void |
sendFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime)
Send a vector of float features as a text message. |
void |
sendFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
Send a vector of float features as a text message. |
protected void |
sendTextFeatureVector(float[] features,
long usertime)
For periodic messages |
protected void |
sendTextFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
For event-based messages |
void |
setFeatureNames(java.lang.String[] aFeatureNames)
Initiate the list of feature names to use. |
| Methods inherited from class eu.semaine.jms.sender.Sender |
|---|
fillMessageProperties, fillMessageProperties, fillMessageProperties, getDatatype, getPeriod, getSource, getTimeToLive, initialise, isEventBased, isPeriodic, main, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, setEventBased, setPeriodic, setTimeToLive |
| Methods inherited from class eu.semaine.jms.IOBase |
|---|
createConnection, getConnection, getConnection, getConnectionStatus, getJMSPassword, getJMSUrl, getJMSUser, getSession, getTopic, getTopicName, isEmbeddedBroker, startConnection, useEmbeddedBroker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String[] featureNames
| Constructor Detail |
|---|
public FeatureSender(java.lang.String topicName,
java.lang.String datatype,
java.lang.String source)
throws JMSException
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.the - period in which we intend to send data, in milliseconds
java.lang.NullPointerException - if any of the parameters topicName, datatype, or source are null.
java.lang.IllegalArgumentException - if period is <= 0.
JMSException
public FeatureSender(java.lang.String topicName,
java.lang.String datatype,
java.lang.String source,
int period)
throws JMSException
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.the - period in which we intend to send data, in milliseconds
java.lang.NullPointerException - if any of the parameters topicName, datatype, or source are null.
java.lang.IllegalArgumentException - if period is <= 0.
JMSException
public FeatureSender(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 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.the - period in which we intend to send data, in milliseconds
JMSException
java.lang.NullPointerException - if any of the parameters jmsUrl, topicName, datatype, or source are null.
java.lang.IllegalArgumentException - if period is <= 0.
public FeatureSender(java.lang.String jmsUrl,
java.lang.String jmsUser,
java.lang.String jmsPassword,
java.lang.String topicName,
java.lang.String datatype,
java.lang.String source,
int period)
throws 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.the - period in which we intend to send data, in milliseconds
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 setFeatureNames(java.lang.String[] aFeatureNames)
aFeatureNames - the feature names, in exactly the same order
as the features that will be sent.
java.lang.IllegalStateException - if feature names have been set before.
java.lang.NullPointerException - if aFeatureNames is null.public java.lang.String[] getFeatureNames()
public void sendFeatureVector(float[] features,
long usertime)
throws JMSException
features - the features to send.usertime - the "user" time at which this message is being sent,
in milliseconds since system startup.
JMSException
public void sendFeatureVector(float[] features,
long usertime,
boolean sendBinary)
throws JMSException
features - the features to send.usertime - the "user" time at which this message is being sent,
in milliseconds since system startup.sendBinary - if true, send as binary feature vector, else send as textual feature vector
JMSException
public void sendFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime)
throws JMSException
features - the features to send.usertime - the "user" time at which this message is being sent,
in milliseconds since system startup.eventType - the type of event represented by this message.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.
JMSException
public void sendFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
throws JMSException
features - the features to send.usertime - the "user" time at which this message is being sent,
in milliseconds since system startup.eventType - the type of event represented by this message.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.contentType - an optional content type for the message's content;
The value may be one of SEMAINEMessage.CONTENT_TYPE_UTTERANCE, SEMAINEMessage.CONTENT_TYPE_LISTENERVOCALISATION,
SEMAINEMessage.CONTENT_TYPE_VISUALONLY, or any other string. Can be null, in which case no content type will be sent.
JMSException
public void sendFeatureVector(float[] features,
long usertime,
boolean sendBinary,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime)
throws JMSException
features - the features to send.usertime - the "user" time at which this message is being sent,
in milliseconds since system startup.sendBinary - if true, send as binary feature vector, else send as textual feature vectoreventType - the type of event represented by this message.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.
JMSException
public void sendFeatureVector(float[] features,
long usertime,
boolean sendBinary,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
throws JMSException
features - the features to send.usertime - the "user" time that this message refers to,
in milliseconds since system startup.sendBinary - if true, send as binary feature vector, else send as textual feature vectoreventType - the type of event represented by this message.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.contentType - an optional content type for the message's content;
The value may be one of SEMAINEMessage.CONTENT_TYPE_UTTERANCE, SEMAINEMessage.CONTENT_TYPE_LISTENERVOCALISATION,
SEMAINEMessage.CONTENT_TYPE_VISUALONLY, or any other string. Can be null, in which case no content type will be sent.
JMSException
protected void sendBinaryFeatureVector(float[] features,
long usertime)
throws JMSException
features - usertime -
JMSException
protected void sendBinaryFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
throws JMSException
features - usertime -
JMSException
protected void sendTextFeatureVector(float[] features,
long usertime)
throws JMSException
features - usertime -
JMSException
protected void sendTextFeatureVector(float[] features,
long usertime,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime,
java.lang.String contentType)
throws JMSException
features - usertime - eventType - contentID - contentCreationTime -
JMSException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||