Class: VertxApex::FaviconHandler
- Inherits:
-
Object
- Object
- VertxApex::FaviconHandler
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-apex/src/main/resources/vertx-apex/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)
-
+ (::VertxApex::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
+ (::VertxApex::FaviconHandler) create + (::VertxApex::FaviconHandler) create(path) + (::VertxApex::FaviconHandler) create(maxAgeSeconds) + (::VertxApex::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-apex/src/main/resources/vertx-apex/favicon_handler.rb', line 37 def self.create(param_1=nil,param_2=nil) if !block_given? && param_1 == nil && param_2 == nil return ::VertxApex::FaviconHandler.new(Java::IoVertxExtApexHandler::FaviconHandler.java_method(:create, []).call()) elsif param_1.class == String && !block_given? && param_2 == nil return ::VertxApex::FaviconHandler.new(Java::IoVertxExtApexHandler::FaviconHandler.java_method(:create, [Java::java.lang.String.java_class]).call(param_1)) elsif param_1.class == Fixnum && !block_given? && param_2 == nil return ::VertxApex::FaviconHandler.new(Java::IoVertxExtApexHandler::FaviconHandler.java_method(:create, [Java::long.java_class]).call(param_1)) elsif param_1.class == String && param_2.class == Fixnum && !block_given? return ::VertxApex::FaviconHandler.new(Java::IoVertxExtApexHandler::FaviconHandler.java_method(:create, [Java::java.lang.String.java_class,Java::long.java_class]).call(param_1,param_2)) 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-apex/src/main/resources/vertx-apex/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::IoVertxExtApex::RoutingContext.java_class]).call(arg0.j_del) end raise ArgumentError, "Invalid arguments when calling handle(arg0)" end |