Class: VertxWeb::FaviconHandler
- Inherits:
-
Object
- Object
- VertxWeb::FaviconHandler
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/favicon_handler.rb
Overview
A handler that serves favicons.
If no file system path is specified it will attempt to serve a resource called `favicon.ico` from the classpath.
Class Method Summary (collapse)
-
+ (::VertxWeb::FaviconHandler) create(param_1 = nil, param_2 = nil)
Create a handler attempting to load favicon file from the specified path, and with the specified max cache time.
Instance Method Summary (collapse)
Class Method Details
+ (::VertxWeb::FaviconHandler) create + (::VertxWeb::FaviconHandler) create(path) + (::VertxWeb::FaviconHandler) create(maxAgeSeconds) + (::VertxWeb::FaviconHandler) create(path, maxAgeSeconds)
Create a handler attempting to load favicon file from the specified path, and with the specified max cache time
37 38 39 40 41 42 43 44 45 46 47 48 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/favicon_handler.rb', line 37 def self.create(param_1=nil,param_2=nil) if !block_given? && param_1 == nil && param_2 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::FaviconHandler.java_method(:create, []).call(),::VertxWeb::FaviconHandler) elsif param_1.class == String && !block_given? && param_2 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::FaviconHandler.java_method(:create, [Java::java.lang.String.java_class]).call(param_1),::VertxWeb::FaviconHandler) elsif param_1.class == Fixnum && !block_given? && param_2 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::FaviconHandler.java_method(:create, [Java::long.java_class]).call(param_1),::VertxWeb::FaviconHandler) elsif param_1.class == String && param_2.class == Fixnum && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::FaviconHandler.java_method(:create, [Java::java.lang.String.java_class,Java::long.java_class]).call(param_1,param_2),::VertxWeb::FaviconHandler) end raise ArgumentError, "Invalid arguments when calling create(param_1,param_2)" end |
Instance Method Details
- (void) handle(arg0 = nil)
This method returns an undefined value.
21 22 23 24 25 26 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/favicon_handler.rb', line 21 def handle(arg0=nil) if arg0.class.method_defined?(:j_del) && !block_given? return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(arg0.j_del) end raise ArgumentError, "Invalid arguments when calling handle(arg0)" end |