|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eu.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.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, 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)
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,
IOBase.Event eventType,
java.lang.String contentID,
long contentCreationTime)
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)
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, 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 |
Field Detail |
---|
protected java.lang.String[] featureNames
Constructor Detail |
---|
public FeatureSender(java.lang.String topicName, java.lang.String datatype, java.lang.String source) throws javax.jms.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.
javax.jms.JMSException
public FeatureSender(java.lang.String topicName, java.lang.String datatype, java.lang.String source, int period) throws javax.jms.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.
javax.jms.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 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.the
- period in which we intend to send data, in milliseconds
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.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 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.the
- period in which we intend to send data, in milliseconds
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 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 javax.jms.JMSException
features
- the features to send.usertime
- the "user" time at which this message is being sent,
in milliseconds since 1970.
javax.jms.JMSException
public void sendFeatureVector(float[] features, long usertime, boolean sendBinary) throws javax.jms.JMSException
features
- the features to send.usertime
- the "user" time at which this message is being sent,
in milliseconds since 1970.
javax.jms.JMSException
public void sendFeatureVector(float[] features, long usertime, IOBase.Event eventType, java.lang.String contentID, long contentCreationTime) throws javax.jms.JMSException
features
- the features to send.usertime
- the "user" time at which this message is being sent,
in milliseconds since 1970.
javax.jms.JMSException
public void sendFeatureVector(float[] features, long usertime, boolean sendBinary, IOBase.Event eventType, java.lang.String contentID, long contentCreationTime) throws javax.jms.JMSException
features
- the features to send.usertime
- the "user" time at which this message is being sent,
in milliseconds since 1970.
javax.jms.JMSException
protected void sendBinaryFeatureVector(float[] features, long usertime) throws javax.jms.JMSException
features
- usertime
-
javax.jms.JMSException
protected void sendBinaryFeatureVector(float[] features, long usertime, IOBase.Event eventType, java.lang.String contentID, long contentCreationTime) throws javax.jms.JMSException
features
- usertime
-
javax.jms.JMSException
protected void sendTextFeatureVector(float[] features, long usertime) throws javax.jms.JMSException
features
- usertime
-
javax.jms.JMSException
protected void sendTextFeatureVector(float[] features, long usertime, IOBase.Event eventType, java.lang.String contentID, long contentCreationTime) throws javax.jms.JMSException
features
- usertime
- eventType
- contentID
- contentCreationTime
-
javax.jms.JMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |