}
ConfigSupport.apply(new SingleConfigCode<Http>() {
@Override
public Object run(Http param) throws TransactionFailure {
Spdy spdy = param.createChild(Spdy.class);
if (maxStreams != null) {
int maxStreamsLocal = Integer.parseInt(maxStreams);
if (maxStreamsLocal > 0) {
spdy.setMaxConcurrentStreams(maxStreamsLocal);
}
}
if (initialWindowSize != null) {
int initialWindowSizeLocal = Integer.parseInt(initialWindowSize);
if (initialWindowSizeLocal > 0) {
spdy.setInitialWindowSizeInBytes(initialWindowSizeLocal);
}
}
if (maxFrameLengthInBytes != null) {
int maxFrameLengthInBytesLocal = Integer.parseInt(maxFrameLengthInBytes);
if (maxFrameLengthInBytesLocal > 0 && maxFrameLengthInBytesLocal < (1 << 24)) {
spdy.setMaxFrameLengthInBytes(maxFrameLengthInBytesLocal);
}
}
if (mode != null) {
String modeLocal = mode.toLowerCase(Locale.US);
spdy.setMode(modeLocal);
}
param.setSpdy(spdy);
return spdy;
}
}, http);