org.robokind.impl.messaging
Class JMSAvroMessageAsyncReceiver<Msg,Rec extends org.apache.avro.generic.IndexedRecord>
java.lang.Object
org.robokind.api.messaging.DefaultMessageAsyncReceiver<Msg,Rec>
org.robokind.impl.messaging.JMSAvroMessageAsyncReceiver<Msg,Rec>
- Type Parameters:
Msg
- type of Message to be handled and send to listenersRec
- type of Avro Record to receive
- All Implemented Interfaces:
- org.jflux.api.core.Notifier<Msg>, org.robokind.api.messaging.MessageAsyncReceiver<Msg>
public class JMSAvroMessageAsyncReceiver<Msg,Rec extends org.apache.avro.generic.IndexedRecord>
- extends org.robokind.api.messaging.DefaultMessageAsyncReceiver<Msg,Rec>
A DefaultMessageAsyncReceiver for asynchronously receiving Avro Records over
JMS (Qpid).
- Author:
- Matthew Stevenson
Constructor Summary |
JMSAvroMessageAsyncReceiver(javax.jms.Session session,
javax.jms.Destination destination,
Class<Rec> recordClass,
org.apache.avro.Schema recordSchema)
Creates a new JMSAvroMessageAsyncReceiver |
Method Summary |
void |
start()
Start the JMSAvroMessageAsyncReceiver receiving Message. |
Methods inherited from class org.robokind.api.messaging.DefaultMessageAsyncReceiver |
addListener, fireMessageEvent, notifyListeners, pause, removeListener, resume, setAdapter, setRecordReceiver, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JMSAvroMessageAsyncReceiver
public JMSAvroMessageAsyncReceiver(javax.jms.Session session,
javax.jms.Destination destination,
Class<Rec> recordClass,
org.apache.avro.Schema recordSchema)
- Creates a new JMSAvroMessageAsyncReceiver
- Parameters:
session
- the JMS Session to use for receivingdestination
- the JMS Destination to receive fromrecordClass
- the Class of the Avro Record being receivedrecordSchema
- the Avro Schema of the Record being received
start
public void start()
throws javax.jms.JMSException,
Exception
- Start the JMSAvroMessageAsyncReceiver receiving Message.
Creates and starts a JMSAvroRecordAsyncReceiver to receive Records.
- Specified by:
start
in interface org.robokind.api.messaging.MessageAsyncReceiver<Msg>
- Overrides:
start
in class org.robokind.api.messaging.DefaultMessageAsyncReceiver<Msg,Rec extends org.apache.avro.generic.IndexedRecord>
- Throws:
javax.jms.JMSException
- if there is an error creating a JMS MessageConsumer
or starting the JMS Polling Service.
Exception
- inherited throws statement, should not throw Exception
Copyright © 2011-2013. All Rights Reserved.