|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.impl.messaging.JMSRecordSender<T>
public class JMSRecordSender<T extends org.apache.avro.generic.IndexedRecord>
Sends Avro Records over JMS (Qpid).
Field Summary | |
---|---|
protected Class<T> |
myClass
|
protected javax.jms.Destination |
myDestination
|
protected javax.jms.MessageProducer |
myMessageProducer
|
protected javax.jms.Session |
mySession
|
Constructor Summary | |
---|---|
JMSRecordSender(Class<T> clazz)
Creates a new JMSRecordSender. |
Method Summary | |
---|---|
void |
closeProducer()
Closes the underlying JMS MessageProducer making it unable to send Records. |
void |
openProducer()
Opens the underlying JMS MessageProducer, allowing it to begin sending Records. |
void |
sendRecord(T record)
Serializes the given Avro Record to a byte array, packs it into a JMS BytesMessage, and sends it to the JMS Destination. |
void |
setDestination(javax.jms.Destination dest)
Sets the JMS Destination to send to. |
void |
setSession(javax.jms.Session session)
Sets the JMS Session to use for sending |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Class<T extends org.apache.avro.generic.IndexedRecord> myClass
protected javax.jms.Session mySession
protected javax.jms.Destination myDestination
protected javax.jms.MessageProducer myMessageProducer
Constructor Detail |
---|
public JMSRecordSender(Class<T> clazz)
clazz
- Class of the Avro Record to sendMethod Detail |
---|
public void setSession(javax.jms.Session session)
session
- public void setDestination(javax.jms.Destination dest)
dest
- JMS Destination to send topublic void closeProducer()
public void openProducer()
public void sendRecord(T record)
sendRecord
in interface org.robokind.api.messaging.RecordSender<T extends org.apache.avro.generic.IndexedRecord>
record
- the Avro Record to send
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |