use of org.opensmartgridplatform.shared.infra.jms.MessageProcessor in project open-smart-grid-platform by OSGP.
the class OsgpCoreRequestMessageListener method onMessage.
@Override
public void onMessage(final Message message) {
try {
LOGGER.info("Received message");
final ObjectMessage objectMessage = (ObjectMessage) message;
final MessageProcessor processor = this.messageProcessorMap.getMessageProcessor(objectMessage);
processor.processMessage(objectMessage);
} catch (final JMSException e) {
// Can't read message.
LOGGER.error("Exception: {}, StackTrace: {}", e.getMessage(), e.getStackTrace(), e);
}
}
use of org.opensmartgridplatform.shared.infra.jms.MessageProcessor in project open-smart-grid-platform by OSGP.
the class OsgpCoreResponseMessageListener method onMessage.
@Override
public void onMessage(final Message message) {
try {
LOGGER.info("Received message of type: {}", message.getJMSType());
final ObjectMessage objectMessage = (ObjectMessage) message;
final MessageProcessor processor = this.messageProcessorMap.getMessageProcessor(objectMessage);
processor.processMessage(objectMessage);
} catch (final JMSException ex) {
LOGGER.error("Exception: {} ", ex.getMessage(), ex);
}
}
use of org.opensmartgridplatform.shared.infra.jms.MessageProcessor in project open-smart-grid-platform by OSGP.
the class KafkaRequestMessageListener method onMessage.
@Override
public void onMessage(final Message message) {
try {
LOGGER.info("Received message of type: {}", message.getJMSType());
final ObjectMessage objectMessage = (ObjectMessage) message;
final MessageProcessor processor = this.messageProcessorMap.getMessageProcessor(objectMessage);
processor.processMessage(objectMessage);
} catch (final JMSException ex) {
LOGGER.error("Exception: {} ", ex.getMessage(), ex);
}
}
use of org.opensmartgridplatform.shared.infra.jms.MessageProcessor in project open-smart-grid-platform by OSGP.
the class WebServiceRequestMessageListener method onMessage.
@Override
public void onMessage(final Message message) {
try {
LOGGER.info("Received message of type: {}", message.getJMSType());
final ObjectMessage objectMessage = (ObjectMessage) message;
final MessageProcessor processor = this.messageProcessorMap.getMessageProcessor(objectMessage);
processor.processMessage(objectMessage);
} catch (final JMSException ex) {
LOGGER.error("Exception: {} ", ex.getMessage(), ex);
}
}
use of org.opensmartgridplatform.shared.infra.jms.MessageProcessor in project open-smart-grid-platform by OSGP.
the class PublicLightingResponseMessageListener method onMessage.
@Override
public void onMessage(final Message message) {
try {
final String messageType = message.getJMSType();
LOGGER.info("Received message of type: {}", messageType);
final ObjectMessage objectMessage = (ObjectMessage) message;
final String correlationUid = objectMessage.getJMSCorrelationID();
LOGGER.info("objectMessage CorrelationUID: {}", correlationUid);
final MessageProcessor processor = this.messageProcessorMap.getMessageProcessor(objectMessage);
processor.processMessage(objectMessage);
} catch (final JMSException ex) {
LOGGER.error("Exception: {} ", ex.getMessage(), ex);
}
}
Aggregations