Module: VertxWeb::ParsedHeaderValue
- Included in:
- LanguageHeader, MIMEHeader, ParsedHeaderValueImpl
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb
Class Method Summary (collapse)
-
+ (Object) DEFAULT_WEIGHT
If no "q" parameter is present, the default weight is 1.
Instance Method Summary (collapse)
-
- (true, false) isMatchedBy(matchTry)
Test if this header is matched by matchTry header.
-
- (String) parameter(key)
The value of the parameter specified by this key.
-
- (Hash{String => String}) parameters
The parameters specified in this header value.
-
- (true, false) isPermitted
Is this an allowed operation as specified by the corresponding header?.
-
- (String) rawValue
Contains the raw value that was received from the user agent.
-
- (String) value
Holds the unparsed value of the header.
-
- (Float) weight
Holds the weight specified in the "q" parameter of the header.
-
- (Fixnum) weightedOrder
An integer that represents the absolute order position of this header.
Class Method Details
+ (Object) DEFAULT_WEIGHT
If no "q" parameter is present, the default weight is 1.
123 124 125 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 123 def self.DEFAULT_WEIGHT Java::IoVertxExtWeb::ParsedHeaderValue.DEFAULT_WEIGHT end |
Instance Method Details
- (true, false) isMatchedBy(matchTry)
Test if this header is matched by matchTry header
112 113 114 115 116 117 118 119 120 121 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 112 def matched_by?(*args) if args[0].class.method_defined?(:j_del) && !block_given? return @j_del.java_method(:isMatchedBy, [Java::IoVertxExtWeb::ParsedHeaderValue.java_class]).call(args[0].j_del) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling matched_by?(#{args[0]})" end end |
- (String) parameter(key)
The value of the parameter specified by this key. Each is one of 3 things:
- null <- That key was not specified
- ParsedHeaderValue.EMPTY (tested using ==) <- The value was not specified
- [Other] <- The value of the parameter
q
parameter is never present.
55 56 57 58 59 60 61 62 63 64 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 55 def parameter(*args) if args[0].class == String && !block_given? return @j_del.java_method(:parameter, [Java::java.lang.String.java_class]).call(args[0]) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling parameter(#{args[0]})" end end |
- (Hash{String => String}) parameters
The parameters specified in this header value.
Note: The
q
parameter is never present.
84 85 86 87 88 89 90 91 92 93 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 84 def parameters if !block_given? return Java::IoVertxLangRuby::Helper.adaptingMap(@j_del.java_method(:parameters, []).call(), Proc.new { |val| val }, Proc.new { |val| ::Vertx::Util::Utils.to_string(val) }) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling parameters()" end end |
- (true, false) isPermitted
Is this an allowed operation as specified by the corresponding header?
35 36 37 38 39 40 41 42 43 44 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 35 def permitted? if !block_given? return @j_del.java_method(:isPermitted, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling permitted?()" end end |
- (String) rawValue
Contains the raw value that was received from the user agent
22 23 24 25 26 27 28 29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 22 def raw_value if !block_given? return @j_del.java_method(:rawValue, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling raw_value()" end end |
- (String) value
Holds the unparsed value of the header.
For the most part, this is the content before the semi-colon (";")
For the most part, this is the content before the semi-colon (";")
98 99 100 101 102 103 104 105 106 107 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 98 def value if !block_given? return @j_del.java_method(:value, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling value()" end end |
- (Float) weight
Holds the weight specified in the "q" parameter of the header.
If the parameter is not specified, 1.0 is assumed according to rfc7231
If the parameter is not specified, 1.0 is assumed according to rfc7231
70 71 72 73 74 75 76 77 78 79 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 70 def weight if !block_given? return @j_del.java_method(:weight, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling weight()" end end |
- (Fixnum) weightedOrder
An integer that represents the absolute order position of this header
9 10 11 12 13 14 15 16 17 18 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_value.rb', line 9 def weighted_order if !block_given? return @j_del.java_method(:weightedOrder, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling weighted_order()" end end |