Class: VertxWeb::StaticHandler

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb

Overview

A handler for serving static resources from the file system or classpath.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


18
19
20
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 18

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

+ (::VertxWeb::StaticHandler) create(root = nil)

Create a handler, specifying web-root

Parameters:

  • root (String) (defaults to: nil)
    the web-root

Returns:

Raises:

  • (ArgumentError)


45
46
47
48
49
50
51
52
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 45

def self.create(root=nil)
  if !block_given? && root == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::StaticHandler.java_method(:create, []).call(),::VertxWeb::StaticHandler)
  elsif root.class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::StaticHandler.java_method(:create, [Java::java.lang.String.java_class]).call(root),::VertxWeb::StaticHandler)
  end
  raise ArgumentError, "Invalid arguments when calling create(#{root})"
end

+ (Object) DEFAULT_ALWAYS_ASYNC_FS

Default of whether async filesystem access should always be used


296
297
298
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 296

def self.DEFAULT_ALWAYS_ASYNC_FS
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_ALWAYS_ASYNC_FS
end

+ (Object) DEFAULT_CACHE_ENTRY_TIMEOUT

Default cache entry timeout, when caching


284
285
286
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 284

def self.DEFAULT_CACHE_ENTRY_TIMEOUT
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_CACHE_ENTRY_TIMEOUT
end

+ (Object) DEFAULT_CACHING_ENABLED

Default of whether cache header handling is enabled


268
269
270
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 268

def self.DEFAULT_CACHING_ENABLED
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_CACHING_ENABLED
end

+ (Object) DEFAULT_DIRECTORY_LISTING

Default of whether directory listing is enabled


272
273
274
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 272

def self.DEFAULT_DIRECTORY_LISTING
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_DIRECTORY_LISTING
end

+ (Object) DEFAULT_DIRECTORY_TEMPLATE

Default template file to use for directory listing


276
277
278
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 276

def self.DEFAULT_DIRECTORY_TEMPLATE
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_DIRECTORY_TEMPLATE
end

+ (Object) DEFAULT_ENABLE_FS_TUNING

Default of whether fs async/sync tuning should be used


300
301
302
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 300

def self.DEFAULT_ENABLE_FS_TUNING
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_ENABLE_FS_TUNING
end

+ (Object) DEFAULT_FILES_READ_ONLY

Default value of whether files are read -only and never will be updated


260
261
262
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 260

def self.DEFAULT_FILES_READ_ONLY
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_FILES_READ_ONLY
end

+ (Object) DEFAULT_INCLUDE_HIDDEN

Default of whether hidden files can be served


280
281
282
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 280

def self.DEFAULT_INCLUDE_HIDDEN
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_INCLUDE_HIDDEN
end

+ (Object) DEFAULT_INDEX_PAGE

The default index page


288
289
290
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 288

def self.DEFAULT_INDEX_PAGE
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_INDEX_PAGE
end

+ (Object) DEFAULT_MAX_AGE_SECONDS

Default max age for cache headers


264
265
266
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 264

def self.DEFAULT_MAX_AGE_SECONDS
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_MAX_AGE_SECONDS
end

+ (Object) DEFAULT_MAX_AVG_SERVE_TIME_NS

Default max avg serve time, in ns, over which serving will be considered slow


304
305
306
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 304

def self.DEFAULT_MAX_AVG_SERVE_TIME_NS
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_MAX_AVG_SERVE_TIME_NS
end

+ (Object) DEFAULT_MAX_CACHE_SIZE

The default max cache size


292
293
294
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 292

def self.DEFAULT_MAX_CACHE_SIZE
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_MAX_CACHE_SIZE
end

+ (Object) DEFAULT_RANGE_SUPPORT

Default of whether Range request handling support should be used


308
309
310
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 308

def self.DEFAULT_RANGE_SUPPORT
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_RANGE_SUPPORT
end

+ (Object) DEFAULT_ROOT_FILESYSTEM_ACCESS

Default of whether access to the root of the file system should be allowed or just allow from the current working directory.


313
314
315
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 313

def self.DEFAULT_ROOT_FILESYSTEM_ACCESS
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_ROOT_FILESYSTEM_ACCESS
end

+ (Object) DEFAULT_SEND_VARY_HEADER

Default of whether vary header should be sent.


317
318
319
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 317

def self.DEFAULT_SEND_VARY_HEADER
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_SEND_VARY_HEADER
end

+ (Object) DEFAULT_WEB_ROOT

Default value of the web-root, where files are served from


256
257
258
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 256

def self.DEFAULT_WEB_ROOT
  Java::IoVertxExtWebHandler::StaticHandler.DEFAULT_WEB_ROOT
end

+ (Object) j_api_type



27
28
29
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 27

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



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

def self.j_class
  Java::IoVertxExtWebHandler::StaticHandler.java_class
end

+ (Object) unwrap(obj)



24
25
26
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 24

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

+ (Object) wrap(obj)



21
22
23
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 21

def @@j_api_type.wrap(obj)
  StaticHandler.new(obj)
end

Instance Method Details

- (void) handle(event = nil)

This method returns an undefined value.

Something has happened, so handle it.

Parameters:

Raises:

  • (ArgumentError)


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

def handle(event=nil)
  if event.class.method_defined?(:j_del) && !block_given?
    return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(event.j_del)
  end
  raise ArgumentError, "Invalid arguments when calling handle(#{event})"
end

- (self) set_allow_root_file_system_access(allowRootFileSystemAccess = nil)

Enable/Disable access to the root of the filesystem

Parameters:

  • allowRootFileSystemAccess (true, false) (defaults to: nil)
    whether root access is allowed

Returns:

  • (self)

Raises:

  • (ArgumentError)


56
57
58
59
60
61
62
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 56

def set_allow_root_file_system_access(allowRootFileSystemAccess=nil)
  if (allowRootFileSystemAccess.class == TrueClass || allowRootFileSystemAccess.class == FalseClass) && !block_given?
    @j_del.java_method(:setAllowRootFileSystemAccess, [Java::boolean.java_class]).call(allowRootFileSystemAccess)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_allow_root_file_system_access(#{allowRootFileSystemAccess})"
end

- (self) set_always_async_fs(alwaysAsyncFS = nil)

Set whether async filesystem access should always be used

Parameters:

  • alwaysAsyncFS (true, false) (defaults to: nil)
    true for always async FS access

Returns:

  • (self)

Raises:

  • (ArgumentError)


188
189
190
191
192
193
194
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 188

def set_always_async_fs(alwaysAsyncFS=nil)
  if (alwaysAsyncFS.class == TrueClass || alwaysAsyncFS.class == FalseClass) && !block_given?
    @j_del.java_method(:setAlwaysAsyncFS, [Java::boolean.java_class]).call(alwaysAsyncFS)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_always_async_fs(#{alwaysAsyncFS})"
end

- (self) set_cache_entry_timeout(timeout = nil)

Set the server cache entry timeout when caching is enabled

Parameters:

  • timeout (Fixnum) (defaults to: nil)
    the timeout, in ms

Returns:

  • (self)

Raises:

  • (ArgumentError)


126
127
128
129
130
131
132
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 126

def set_cache_entry_timeout(timeout=nil)
  if timeout.class == Fixnum && !block_given?
    @j_del.java_method(:setCacheEntryTimeout, [Java::long.java_class]).call(timeout)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_cache_entry_timeout(#{timeout})"
end

- (self) set_caching_enabled(enabled = nil)

Set whether cache header handling is enabled

Parameters:

  • enabled (true, false) (defaults to: nil)
    true if enabled

Returns:

  • (self)

Raises:

  • (ArgumentError)


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

def set_caching_enabled(enabled=nil)
  if (enabled.class == TrueClass || enabled.class == FalseClass) && !block_given?
    @j_del.java_method(:setCachingEnabled, [Java::boolean.java_class]).call(enabled)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_caching_enabled(#{enabled})"
end

- (self) set_default_content_encoding(contentEncoding = nil)

Set the default content encoding for text related files. This allows overriding the system settings default value.

Parameters:

  • contentEncoding (String) (defaults to: nil)
    the desired content encoding e.g.: "UTF-8"

Returns:

  • (self)

Raises:

  • (ArgumentError)


248
249
250
251
252
253
254
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 248

def set_default_content_encoding(contentEncoding=nil)
  if contentEncoding.class == String && !block_given?
    @j_del.java_method(:setDefaultContentEncoding, [Java::java.lang.String.java_class]).call(contentEncoding)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_default_content_encoding(#{contentEncoding})"
end

- (self) set_directory_listing(directoryListing = nil)

Set whether directory listing is enabled

Parameters:

  • directoryListing (true, false) (defaults to: nil)
    true if enabled

Returns:

  • (self)

Raises:

  • (ArgumentError)


106
107
108
109
110
111
112
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 106

def set_directory_listing(directoryListing=nil)
  if (directoryListing.class == TrueClass || directoryListing.class == FalseClass) && !block_given?
    @j_del.java_method(:setDirectoryListing, [Java::boolean.java_class]).call(directoryListing)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_directory_listing(#{directoryListing})"
end

- (self) set_directory_template(directoryTemplate = nil)

Set the directory template to be used when directory listing

Parameters:

  • directoryTemplate (String) (defaults to: nil)
    the directory template

Returns:

  • (self)

Raises:

  • (ArgumentError)


218
219
220
221
222
223
224
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 218

def set_directory_template(directoryTemplate=nil)
  if directoryTemplate.class == String && !block_given?
    @j_del.java_method(:setDirectoryTemplate, [Java::java.lang.String.java_class]).call(directoryTemplate)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_directory_template(#{directoryTemplate})"
end

- (self) set_enable_fs_tuning(enableFSTuning = nil)

Set whether async/sync filesystem tuning should enabled

Parameters:

  • enableFSTuning (true, false) (defaults to: nil)
    true to enabled FS tuning

Returns:

  • (self)

Raises:

  • (ArgumentError)


198
199
200
201
202
203
204
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 198

def set_enable_fs_tuning(enableFSTuning=nil)
  if (enableFSTuning.class == TrueClass || enableFSTuning.class == FalseClass) && !block_given?
    @j_del.java_method(:setEnableFSTuning, [Java::boolean.java_class]).call(enableFSTuning)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_enable_fs_tuning(#{enableFSTuning})"
end

- (self) set_enable_range_support(enableRangeSupport = nil)

Set whether range requests (resumable downloads; media streaming) should be enabled.

Parameters:

  • enableRangeSupport (true, false) (defaults to: nil)
    true to enable range support

Returns:

  • (self)

Raises:

  • (ArgumentError)


228
229
230
231
232
233
234
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 228

def set_enable_range_support(enableRangeSupport=nil)
  if (enableRangeSupport.class == TrueClass || enableRangeSupport.class == FalseClass) && !block_given?
    @j_del.java_method(:setEnableRangeSupport, [Java::boolean.java_class]).call(enableRangeSupport)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_enable_range_support(#{enableRangeSupport})"
end

- (self) set_files_read_only(readOnly = nil)

Set whether files are read-only and will never change

Parameters:

  • readOnly (true, false) (defaults to: nil)
    whether files are read-only

Returns:

  • (self)

Raises:

  • (ArgumentError)


76
77
78
79
80
81
82
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 76

def set_files_read_only(readOnly=nil)
  if (readOnly.class == TrueClass || readOnly.class == FalseClass) && !block_given?
    @j_del.java_method(:setFilesReadOnly, [Java::boolean.java_class]).call(readOnly)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_files_read_only(#{readOnly})"
end

- (self) set_http2_push_mapping(http2PushMappings = nil)

Set the file mapping for http2push and link preload

Parameters:

  • http2PushMappings (Array<Hash>) (defaults to: nil)
    the mapping for http2 push

Returns:

  • (self)

Raises:

  • (ArgumentError)


156
157
158
159
160
161
162
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 156

def set_http2_push_mapping(http2PushMappings=nil)
  if http2PushMappings.class == Array && !block_given?
    @j_del.java_method(:setHttp2PushMapping, [Java::JavaUtil::List.java_class]).call(http2PushMappings.map { |element| Java::IoVertxExtWeb::Http2PushMapping.new(::Vertx::Util::Utils.to_json_object(element)) })
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_http2_push_mapping(#{http2PushMappings})"
end

- (self) set_include_hidden(includeHidden = nil)

Set whether hidden files should be served

Parameters:

  • includeHidden (true, false) (defaults to: nil)
    true if hidden files should be served

Returns:

  • (self)

Raises:

  • (ArgumentError)


116
117
118
119
120
121
122
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 116

def set_include_hidden(includeHidden=nil)
  if (includeHidden.class == TrueClass || includeHidden.class == FalseClass) && !block_given?
    @j_del.java_method(:setIncludeHidden, [Java::boolean.java_class]).call(includeHidden)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_include_hidden(#{includeHidden})"
end

- (self) set_index_page(indexPage = nil)

Set the index page

Parameters:

  • indexPage (String) (defaults to: nil)
    the index page

Returns:

  • (self)

Raises:

  • (ArgumentError)


136
137
138
139
140
141
142
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 136

def set_index_page(indexPage=nil)
  if indexPage.class == String && !block_given?
    @j_del.java_method(:setIndexPage, [Java::java.lang.String.java_class]).call(indexPage)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_index_page(#{indexPage})"
end

- (self) set_max_age_seconds(maxAgeSeconds = nil)

Set value for max age in caching headers

Parameters:

  • maxAgeSeconds (Fixnum) (defaults to: nil)
    maximum time for browser to cache, in seconds

Returns:

  • (self)

Raises:

  • (ArgumentError)


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

def set_max_age_seconds(maxAgeSeconds=nil)
  if maxAgeSeconds.class == Fixnum && !block_given?
    @j_del.java_method(:setMaxAgeSeconds, [Java::long.java_class]).call(maxAgeSeconds)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_max_age_seconds(#{maxAgeSeconds})"
end

- (self) set_max_avg_serve_time_ns(maxAvgServeTimeNanoSeconds = nil)

Set the max serve time in ns, above which serves are considered slow

Parameters:

  • maxAvgServeTimeNanoSeconds (Fixnum) (defaults to: nil)
    max serve time, in ns

Returns:

  • (self)

Raises:

  • (ArgumentError)


208
209
210
211
212
213
214
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 208

def set_max_avg_serve_time_ns(maxAvgServeTimeNanoSeconds=nil)
  if maxAvgServeTimeNanoSeconds.class == Fixnum && !block_given?
    @j_del.java_method(:setMaxAvgServeTimeNs, [Java::long.java_class]).call(maxAvgServeTimeNanoSeconds)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_max_avg_serve_time_ns(#{maxAvgServeTimeNanoSeconds})"
end

- (self) set_max_cache_size(maxCacheSize = nil)

Set the max cache size, when caching is enabled

Parameters:

  • maxCacheSize (Fixnum) (defaults to: nil)
    the max cache size

Returns:

  • (self)

Raises:

  • (ArgumentError)


146
147
148
149
150
151
152
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 146

def set_max_cache_size(maxCacheSize=nil)
  if maxCacheSize.class == Fixnum && !block_given?
    @j_del.java_method(:setMaxCacheSize, [Java::int.java_class]).call(maxCacheSize)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_max_cache_size(#{maxCacheSize})"
end

- (self) set_send_vary_header(varyHeader = nil)

Set whether vary header should be sent with response.

Parameters:

  • varyHeader (true, false) (defaults to: nil)
    true to sent vary header

Returns:

  • (self)

Raises:

  • (ArgumentError)


238
239
240
241
242
243
244
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 238

def set_send_vary_header(varyHeader=nil)
  if (varyHeader.class == TrueClass || varyHeader.class == FalseClass) && !block_given?
    @j_del.java_method(:setSendVaryHeader, [Java::boolean.java_class]).call(varyHeader)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_send_vary_header(#{varyHeader})"
end

- (self) set_web_root(webRoot = nil)

Set the web root

Parameters:

  • webRoot (String) (defaults to: nil)
    the web root

Returns:

  • (self)

Raises:

  • (ArgumentError)


66
67
68
69
70
71
72
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 66

def set_web_root(webRoot=nil)
  if webRoot.class == String && !block_given?
    @j_del.java_method(:setWebRoot, [Java::java.lang.String.java_class]).call(webRoot)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_web_root(#{webRoot})"
end

- (self) skip_compression_for_media_types(mediaTypes = nil)

Skip compression if the media type of the file to send is in the provided mediaTypes set. Content-Encoding header set to identity for the types present in the mediaTypes set

Parameters:

  • mediaTypes (Set<String>) (defaults to: nil)
    the set of mime types that are already compressed

Returns:

  • (self)

Raises:

  • (ArgumentError)


167
168
169
170
171
172
173
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 167

def skip_compression_for_media_types(mediaTypes=nil)
  if mediaTypes.class == Set && !block_given?
    @j_del.java_method(:skipCompressionForMediaTypes, [Java::JavaUtil::Set.java_class]).call(Java::JavaUtil::LinkedHashSet.new(mediaTypes.map { |element| element }))
    return self
  end
  raise ArgumentError, "Invalid arguments when calling skip_compression_for_media_types(#{mediaTypes})"
end

- (self) skip_compression_for_suffixes(fileSuffixes = nil)

Skip compression if the suffix of the file to send is in the provided fileSuffixes set. Content-Encoding header set to identity for the suffixes present in the fileSuffixes set

Parameters:

  • fileSuffixes (Set<String>) (defaults to: nil)
    the set of file suffixes that are already compressed

Returns:

  • (self)

Raises:

  • (ArgumentError)


178
179
180
181
182
183
184
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/static_handler.rb', line 178

def skip_compression_for_suffixes(fileSuffixes=nil)
  if fileSuffixes.class == Set && !block_given?
    @j_del.java_method(:skipCompressionForSuffixes, [Java::JavaUtil::Set.java_class]).call(Java::JavaUtil::LinkedHashSet.new(fileSuffixes.map { |element| element }))
    return self
  end
  raise ArgumentError, "Invalid arguments when calling skip_compression_for_suffixes(#{fileSuffixes})"
end