Package com.wordpress.salaboy.model.messages.patient

Examples of com.wordpress.salaboy.model.messages.patient.HeartBeatMessage


           
            if (vehicleId == null){
                Logger.getLogger(SensorMessageProducer.class.getName()).log(Level.INFO, "No vehicle id provided!");
                return;
            }
            MessageFactory.sendMessage(new HeartBeatMessage(emergencyId, vehicleId, heartBeat, new Date()));
        } catch (HornetQException ex) {
            throw new Exception("Unable to add Heart Beat message into queue!", ex);
        }
    }
View Full Code Here


        }

        pulse += 235;
        try {
            String emergencyId = ui.getTrackingService().getEmergencyAttachedToCall(this.emergency.getCallId());
            MessageFactory.sendMessage(new HeartBeatMessage(emergencyId, this.activeVehicle.getId(), pulse, new Date()));
        } catch (HornetQException ex) {
            Logger.getLogger(ParticularEmergencyRenderer.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
View Full Code Here

            return new FireExtinctedEvent(realMessage.getEmergencyId(), realMessage.getTime());
        }else if (message instanceof FireTruckWaterRefilledMessage){
            FireTruckWaterRefilledMessage realMessage = (FireTruckWaterRefilledMessage)message;
            return new FireTruckWaterRefilledEvent(realMessage.getEmergencyId(), realMessage.getVehicleId(), realMessage.getTime());
        }else if (message instanceof HeartBeatMessage){
            HeartBeatMessage realMessage = (HeartBeatMessage)message;
            PulseEvent event = new PulseEvent((int)realMessage.getHeartBeatValue());
            event.setEmergencyId(realMessage.getEmergencyId());
            event.setVehicleId(realMessage.getVehicleId());
            return event;
        }
       
       
        throw new UnsupportedOperationException("Don't know how to convert "+message+" to CallEvent instance");
View Full Code Here

            public void run() {
                while (!stopPulseEmulator) {
                    try {
                        for (String vehicleId : heartBeatWidgets.keySet()) {
                            try {
                                MessageFactory.sendMessage(new HeartBeatMessage(emergencyId, vehicleId, 0, new Date()));
                            } catch (HornetQException ex) {
                                Logger.getLogger(EmergencyMonitorPanel.class.getName()).log(Level.SEVERE, null, ex);
                            }
                        }
                        Thread.sleep(1000);
View Full Code Here

TOP

Related Classes of com.wordpress.salaboy.model.messages.patient.HeartBeatMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.