Class: VertxWebClient::ResponsePredicateResult
- Inherits:
-
Object
- Object
- VertxWebClient::ResponsePredicateResult
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb
Overview
Represents the outcome of a ResponsePredicate applied to an .
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (::VertxWebClient::ResponsePredicateResult) failure(message)
Creates a failed result.
- + (Object) j_api_type
- + (Object) j_class
-
+ (::VertxWebClient::ResponsePredicateResult) success
A successful result.
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (String) message
The failure message.
-
- (::VertxWebClient::HttpResponse) response
The which has been tested.
-
- (true, false) succeeded
Whether the result is a success or failure.
Class Method Details
+ (Boolean) accept?(obj)
20 21 22 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 20 def @@j_api_type.accept?(obj) obj.class == ResponsePredicateResult end |
+ (::VertxWebClient::ResponsePredicateResult) failure(message)
Creates a failed result.
52 53 54 55 56 57 58 59 60 61 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 52 def self.failure(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebClientPredicate::ResponsePredicateResult.java_method(:failure, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::ResponsePredicateResult) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling failure(#{args[0]})" end end |
+ (Object) j_api_type
29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 29 def self.j_api_type @@j_api_type end |
+ (Object) j_class
32 33 34 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 32 def self.j_class Java::IoVertxExtWebClientPredicate::ResponsePredicateResult.java_class end |
+ (::VertxWebClient::ResponsePredicateResult) success
Returns a successful result
64 65 66 67 68 69 70 71 72 73 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 64 def self.success if !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebClientPredicate::ResponsePredicateResult.java_method(:success, []).call(),::VertxWebClient::ResponsePredicateResult) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling success()" end end |
+ (Object) unwrap(obj)
26 27 28 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 26 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
23 24 25 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 23 def @@j_api_type.wrap(obj) ResponsePredicateResult.new(obj) end |
Instance Method Details
- (String) message
The failure message. May be
null
.
77 78 79 80 81 82 83 84 85 86 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 77 def if !block_given? return @j_del.java_method(:message, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling message()" end end |
- (::VertxWebClient::HttpResponse) response
The which has been tested.
38 39 40 41 42 43 44 45 46 47 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 38 def response if !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:response, []).call(),::VertxWebClient::HttpResponse,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling response()" end end |
- (true, false) succeeded
Whether the result is a success or failure.
90 91 92 93 94 95 96 97 98 99 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/response_predicate_result.rb', line 90 def succeeded? if !block_given? return @j_del.java_method(:succeeded, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling succeeded?()" end end |