/** * <p> * Specifies whether connection draining is enabled for the load balancer. * </p> * * @param enabled * Specifies whether connection draining is enabled for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionDraining withEnabled(Boolean enabled) { setEnabled(enabled); return this; }
public ConnectionDraining unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionDraining connectionDraining = new ConnectionDraining(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return connectionDraining; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Enabled", targetDepth)) { connectionDraining.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Timeout", targetDepth)) { connectionDraining.setTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return connectionDraining; } } } }
/** * <p> * Specifies whether connection draining is enabled for the load balancer. * </p> * * @param enabled * Specifies whether connection draining is enabled for the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConnectionDraining withEnabled(Boolean enabled) { setEnabled(enabled); return this; }
public ConnectionDraining unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionDraining connectionDraining = new ConnectionDraining(); 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("Enabled", targetDepth)) { connectionDraining.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall( context)); continue; } if (context.testExpression("Timeout", targetDepth)) { connectionDraining.setTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall( context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return connectionDraining; }
public ConnectionDraining unmarshall(StaxUnmarshallerContext context) throws Exception { ConnectionDraining connectionDraining = new ConnectionDraining(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return connectionDraining; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Enabled", targetDepth)) { connectionDraining.setEnabled(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Timeout", targetDepth)) { connectionDraining.setTimeout(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return connectionDraining; } } } }