/* (non-Javadoc) * @see sif3.infra.rest.consumer.AbstractEventConsumer#processEvent(sif3.common.model.SIFEvent, sif3.common.model.SIFZone, sif3.common.model.SIFContext, sif3.common.model.EventMetadata, java.lang.String, java.lang.String) */ @Override public void processEvent( SIFEvent<String> sifEvent, SIFZone zone, SIFContext context, EventMetadata metadata, String msgReadID, String consumerID) { // We know from the framework that zone and context is never null. For the time being we just // log the event. String timestamp = DateUtils.getISO8601withSecFraction(new Date()); logger.debug( RECORD_MARKER + "Record processed by Thread ID = " + Thread.currentThread().getId() + "\n" + sifEvent.getEventAction().name() + " Events from Queue Reader " + msgReadID + "\nReceived at " + timestamp + " from Zone = " + zone.getId() + " and Context = " + context.getId() + "\nData:\n" + sifEvent.getSIFObjectList() + RECORD_MARKER); }
/*---------------------*/ private String getZoneAndContext(SIFZone zone, SIFContext context) { StringBuffer buffer = new StringBuffer(); buffer .append("Zone = ") .append((zone == null) ? "null" : zone.getId() + (zone.getIsDefault() ? " (dafault)" : "")) .append(" "); buffer.append("- Context = ").append((context == null) ? "null" : context.getId()); return buffer.toString(); }