@Override void start() throws Exception{ receiver.start(); } @Override
private ProducerNode<SpeechRecEventList<SpeechRecEvent>> buildSpeechRecChain( Session session, Destination dest){ JMSAvroMessageAsyncReceiver<SpeechRecEventList<SpeechRecEvent>, SpeechRecEventListRecord> rec = new JMSAvroMessageAsyncReceiver<SpeechRecEventList<SpeechRecEvent>, SpeechRecEventListRecord>( session, dest, SpeechRecEventListRecord.class, SpeechRecEventListRecord.SCHEMA$); rec.setAdapter(new EmptyAdapter()); try{ rec.start(); }catch(Exception ex){ theLogger.log(Level.SEVERE, "Unable to start Message Receiver", ex); return null; } return new DefaultProducerNode<SpeechRecEventList<SpeechRecEvent>>(rec); // try{ // return JMSAvroUtils.buildEventReceiverChain( // SpeechRecEventListRecord.class, // SpeechRecEventListRecord.SCHEMA$, // new EmptyAdapter(), // session, dest); // }catch(JMSException ex){ // theLogger.log(Level.WARNING,"Error connecting to Speech Rec.",ex); // return null; // } }
private ProducerNode<SpeechRecEventList<SpeechRecEvent>> buildSpeechRecChain( Session session, Destination dest){ JMSAvroMessageAsyncReceiver<SpeechRecEventList<SpeechRecEvent>, SpeechRecEventListRecord> rec = new JMSAvroMessageAsyncReceiver<SpeechRecEventList<SpeechRecEvent>, SpeechRecEventListRecord>( session, dest, SpeechRecEventListRecord.class, SpeechRecEventListRecord.SCHEMA$); rec.setAdapter(new EmptyAdapter()); try{ rec.start(); }catch(Exception ex){ theLogger.log(Level.SEVERE, "Unable to start Message Receiver", ex); return null; } return new DefaultProducerNode<SpeechRecEventList<SpeechRecEvent>>(rec); // try{ // return JMSAvroUtils.buildEventReceiverChain( // SpeechRecEventListRecord.class, // SpeechRecEventListRecord.SCHEMA$, // new EmptyAdapter(), // session, dest); // }catch(JMSException ex){ // theLogger.log(Level.WARNING,"Error connecting to Speech Rec.",ex); // return null; // } }