private Condition parseHttpCondition ( Element element ) { HttpCondition condition = new HttpCondition ( ) ; condition . setUrl ( element . getAttribute ( "url" ) ) ; String method = element . getAttribute ( "method" ) ; if ( StringUtils . hasText ( method ) ) { condition . setMethod ( method ) ; } String statusCode = element . getAttribute ( "status" ) ; if ( StringUtils . hasText ( statusCode ) ) { condition . setHttpResponseCode ( statusCode ) ; } String timeout = element . getAttribute ( "timeout" ) ; if ( StringUtils . hasText ( timeout ) ) { condition . setTimeout ( timeout ) ; } return condition ; }
Parse Http request condition .