/** * <p> * The date and time that the health checker performed the health check in <a * href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601 format</a> and Coordinated Universal Time (UTC). For * example, the value <code>2017-03-27T17:48:16.751Z</code> represents March 27, 2017 at 17:48:16.751 UTC. * </p> * * @param checkedTime * The date and time that the health checker performed the health check in <a * href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601 format</a> and Coordinated Universal Time (UTC). * For example, the value <code>2017-03-27T17:48:16.751Z</code> represents March 27, 2017 at 17:48:16.751 * UTC. * @return Returns a reference to this object so that method calls can be chained together. */ public StatusReport withCheckedTime(java.util.Date checkedTime) { setCheckedTime(checkedTime); return this; }
public StatusReport unmarshall(StaxUnmarshallerContext context) throws Exception { StatusReport statusReport = new StatusReport(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return statusReport; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Status", targetDepth)) { statusReport.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("CheckedTime", targetDepth)) { statusReport.setCheckedTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return statusReport; } } } }