Class: VertxWeb::ParsedHeaderValues
- Inherits:
-
Object
- Object
- VertxWeb::ParsedHeaderValues
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb
Overview
A container with the request's headers that are meaningful enough to be parsed
Contains:
- Accept -> MIME header, parameters and sortable
- Accept-Charset -> Parameters and sortable
- Accept-Encoding -> Parameters and sortable
- Accept-Language -> Parameters and sortable
- Content-Type -> MIME header and parameters
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (Array<::VertxWeb::MIMEHeader>) accept
List of MIME values in the Accept header.
-
- (Array<::VertxWeb::ParsedHeaderValue>) accept_charset
List of charset values in the Accept-Charset header.
-
- (Array<::VertxWeb::ParsedHeaderValue>) accept_encoding
List of encofing values in the Accept-Encoding header.
-
- (Array<::VertxWeb::LanguageHeader>) accept_language
List of languages in the Accept-Language header.
-
- (::VertxWeb::MIMEHeader) content_type
MIME value in the Content-Type header.
Class Method Details
+ (Boolean) accept?(obj)
29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 29 def @@j_api_type.accept?(obj) obj.class == ParsedHeaderValues end |
+ (Object) j_api_type
38 39 40 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 38 def self.j_api_type @@j_api_type end |
+ (Object) j_class
41 42 43 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 41 def self.j_class Java::IoVertxExtWeb::ParsedHeaderValues.java_class end |
+ (Object) unwrap(obj)
35 36 37 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 35 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
32 33 34 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 32 def @@j_api_type.wrap(obj) ParsedHeaderValues.new(obj) end |
Instance Method Details
- (Array<::VertxWeb::MIMEHeader>) accept
Returns List of MIME values in the
Accept
header
45 46 47 48 49 50 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 45 def accept if !block_given? return @j_del.java_method(:accept, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxWeb::MIMEHeader) } end raise ArgumentError, "Invalid arguments when calling accept()" end |
- (Array<::VertxWeb::ParsedHeaderValue>) accept_charset
Returns List of charset values in the
Accept-Charset
header
52 53 54 55 56 57 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 52 def accept_charset if !block_given? return @j_del.java_method(:acceptCharset, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxWeb::ParsedHeaderValueImpl) } end raise ArgumentError, "Invalid arguments when calling accept_charset()" end |
- (Array<::VertxWeb::ParsedHeaderValue>) accept_encoding
Returns List of encofing values in the
Accept-Encoding
header
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_values.rb', line 59 def accept_encoding if !block_given? return @j_del.java_method(:acceptEncoding, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxWeb::ParsedHeaderValueImpl) } end raise ArgumentError, "Invalid arguments when calling accept_encoding()" end |
- (Array<::VertxWeb::LanguageHeader>) accept_language
Returns List of languages in the
Accept-Language
header
66 67 68 69 70 71 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 66 def accept_language if !block_given? return @j_del.java_method(:acceptLanguage, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxWeb::LanguageHeader) } end raise ArgumentError, "Invalid arguments when calling accept_language()" end |
- (::VertxWeb::MIMEHeader) content_type
Returns MIME value in the
Content-Type
header
73 74 75 76 77 78 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 73 def content_type if !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:contentType, []).call(),::VertxWeb::MIMEHeader) end raise ArgumentError, "Invalid arguments when calling content_type()" end |