@Test public void testTimestampCoversion() throws RainbowException, RuntimeAggregatorException { System.out.println("getEventTimestamp"); AcmeRuntimeAggregator instance = new AcmeRuntimeAggregator(systemConfig, new DummyDatabaseConnector()); IRainbowMessage event = new RainbowESEBMessage(); Date expResult = new Date(System.currentTimeMillis()); event.setProperty(ESEBConstants.MSG_SENT, expResult.getTime() + ""); Date result = instance.getEventTimestamp(event); assertEquals(expResult, result); }
Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } AcmeRuntimeAggregator(ISystemConfiguration config);  AcmeRuntimeAggregator(ISystemConfiguration config,
            IDatabaseConnector dbConn); }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } AcmeRuntimeAggregator(ISystemConfiguration config);  AcmeRuntimeAggregator(ISystemConfiguration config,
            IDatabaseConnector dbConn); @Override void start(); @Override void stop(); @Override IModelInstance<IAcmeSystem> getInternalModel(); @Override IModelInstance<IAcmeSystem> copyInternalModel(); @Override IEventBuffer getEventBuffer(); @Override synchronized void processEvent(String channel, IRainbowMessage event); }
AcmeRuntimeAggregator implements IRuntimeAggregator<IAcmeSystem> { Date getEventTimestamp(IRainbowMessage event) { long sent = Long.parseLong((String) event.getProperty(ESEBConstants.MSG_SENT)); Date timestamp = new Date(sent); return timestamp; } AcmeRuntimeAggregator(ISystemConfiguration config);  AcmeRuntimeAggregator(ISystemConfiguration config,
            IDatabaseConnector dbConn); @Override void start(); @Override void stop(); @Override IModelInstance<IAcmeSystem> getInternalModel(); @Override IModelInstance<IAcmeSystem> copyInternalModel(); @Override IEventBuffer getEventBuffer(); @Override synchronized void processEvent(String channel, IRainbowMessage event);  }