Class: VertxWeb::ParsedHeaderValues

Inherits:
Object
  • Object
show all
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)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


30
31
32
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 30

def @@j_api_type.accept?(obj)
  obj.class == ParsedHeaderValues
end

+ (Object) j_api_type



39
40
41
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 39

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



42
43
44
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 42

def self.j_class
  Java::IoVertxExtWeb::ParsedHeaderValues.java_class
end

+ (Object) unwrap(obj)



36
37
38
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 36

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



33
34
35
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 33

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

Returns:



95
96
97
98
99
100
101
102
103
104
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 95

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling accept()"
  end
end

- (Array<::VertxWeb::ParsedHeaderValue>) acceptCharset

Returns List of charset values in the Accept-Charset header

Returns:



71
72
73
74
75
76
77
78
79
80
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 71

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling accept_charset()"
  end
end

- (Array<::VertxWeb::ParsedHeaderValue>) acceptEncoding

Returns List of encofing values in the Accept-Encoding header

Returns:



59
60
61
62
63
64
65
66
67
68
# 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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling accept_encoding()"
  end
end

- (Array<::VertxWeb::LanguageHeader>) acceptLanguage

Returns List of languages in the Accept-Language header

Returns:



47
48
49
50
51
52
53
54
55
56
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 47

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling accept_language()"
  end
end

- (::VertxWeb::MIMEHeader) contentType

Returns MIME value in the Content-Type header

Returns:



83
84
85
86
87
88
89
90
91
92
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/parsed_header_values.rb', line 83

def content_type
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:contentType, []).call(),::VertxWeb::MIMEHeader)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling content_type()"
  end
end