/** * <p> * The time, in seconds, that the connection is allowed to be idle (no data has been sent over the connection) * before it is closed by the load balancer. * </p> * * @param idleTimeout * The time, in seconds, that the connection is allowed to be idle (no data has been sent over the * connection) before it is closed by the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionSettings withIdleTimeout(Integer idleTimeout) { setIdleTimeout(idleTimeout); return this; }
public ConnectionSettings unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionSettings connectionSettings = new ConnectionSettings(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return connectionSettings; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("IdleTimeout", targetDepth)) { connectionSettings.setIdleTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return connectionSettings; } } } }
/** * <p> * The time, in seconds, that the connection is allowed to be idle (no data has been sent over the connection) * before it is closed by the load balancer. * </p> * * @param idleTimeout * The time, in seconds, that the connection is allowed to be idle (no data has been sent over the * connection) before it is closed by the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionSettings withIdleTimeout(Integer idleTimeout) { setIdleTimeout(idleTimeout); return this; }
public ConnectionSettings unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionSettings connectionSettings = new ConnectionSettings(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("IdleTimeout", targetDepth)) { connectionSettings.setIdleTimeout(IntegerStaxUnmarshaller.getInstance() .unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return connectionSettings; }
public ConnectionSettings unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionSettings connectionSettings = new ConnectionSettings(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return connectionSettings; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("IdleTimeout", targetDepth)) { connectionSettings.setIdleTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return connectionSettings; } } } }