|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.addsimplicity.anicetus.io.jms.JMSDeliveryAdapter
public class JMSDeliveryAdapter
The JMS delivery adapter publishes telemetry to a JMS topic or queue. The delivery is done using Spring's JMS templates. Telemetry is published on a separate thread, asynchronously to the primary application flows. This is done to minimize any overhead that may be introduced into the main application processing. Telemetry artifacts are queued and delivered by worker threads. The application can control the number of worker threads as well as the size of the queue. Additionally, the behavior if the queue overruns can be controlled. Telemetry can either be discarded if there is no further queue space or the calling thread will be used to delivery the artifact. Messages are converted to the desired format using a Spring message converter implementation.
| Constructor Summary | |
|---|---|
JMSDeliveryAdapter()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Called by Spring once all properties have been set. |
javax.jms.ConnectionFactory |
getConnectionFactory()
Get the current connection factory used to connect to the JMS broker. |
javax.jms.Destination |
getDestination()
Get the current destination. |
boolean |
getDiscardOverrun()
Get the current policy for queue overruns. |
int |
getMaxDeliveryQueue()
Get the maximum size of the delivery queue. |
int |
getMaxDeliveryThreads()
Get the maximum number of delivery threads. |
org.springframework.jms.support.converter.MessageConverter |
getMessageConverter()
Get the current message converter. |
void |
sendTelemetry(GlobalInfo telemetry)
Send the telemetry to the JMS topic. |
void |
setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
Set the JMS connection factory that will be used to connect to the broker. |
void |
setDestination(javax.jms.Destination destination)
Set the destination topic or queue for delivering telemetry. |
void |
setDiscardOverrun(boolean discard)
Setting discard to true will cause telemetry to be dropped if the delivery queue is full. |
void |
setExceptionHandler(ExceptionHandler handler)
The exception handler that will be invoked if a delivery error occurs. |
void |
setMaxDeliveryQueue(int maxDeliveryQueue)
The delivery queue holds telemetry to be delivered. |
void |
setMaxDeliveryThreads(int maxDeliveryThreads)
Delivery threads publish events to the JMS topic. |
void |
setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
The message converter is responsible for translating the telemetry artifact to the JMS message structure. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JMSDeliveryAdapter()
| Method Detail |
|---|
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic javax.jms.ConnectionFactory getConnectionFactory()
public javax.jms.Destination getDestination()
public boolean getDiscardOverrun()
public int getMaxDeliveryQueue()
public int getMaxDeliveryThreads()
public org.springframework.jms.support.converter.MessageConverter getMessageConverter()
public void sendTelemetry(GlobalInfo telemetry)
sendTelemetry in interface DeliveryAdaptertelemetry - The telemetry to send.public void setConnectionFactory(javax.jms.ConnectionFactory connectionFactory)
connectionFactory - The factory used to connect to the broker.public void setDestination(javax.jms.Destination destination)
destination - The topic for publishing messages.public void setDiscardOverrun(boolean discard)
discard - True to discard telemetry if the queue is full.public void setExceptionHandler(ExceptionHandler handler)
setExceptionHandler in interface DeliveryAdapterhandler - The exception handler.org.addsimplicity.aniticus.support.DeliveryAdapter#setExceptionHandler(org.addsimplicity.aniticus.support.ExceptionHandler)public void setMaxDeliveryQueue(int maxDeliveryQueue)
maxDeliveryQueue - The maximum number of telemetry events that will be queued.public void setMaxDeliveryThreads(int maxDeliveryThreads)
maxDeliveryThreads - The maximum threads that will be used for delivering telemetry.public void setMessageConverter(org.springframework.jms.support.converter.MessageConverter messageConverter)
messageConverter - The message converter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||