Class: VertxWeb::TimeoutHandler
- Inherits:
-
Object
- Object
- VertxWeb::TimeoutHandler
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/timeout_handler.rb
Overview
Handler that will timeout requests if the response has not been written after a certain time.
Timeout requests will be ended with an HTTP status code `408`.
Class Method Summary (collapse)
-
+ (::VertxWeb::TimeoutHandler) create(timeout = nil)
Create a handler.
Instance Method Summary (collapse)
Class Method Details
+ (::VertxWeb::TimeoutHandler) create(timeout = nil)
Create a handler
29 30 31 32 33 34 35 36 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/timeout_handler.rb', line 29 def self.create(timeout=nil) if !block_given? && timeout == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::TimeoutHandler.java_method(:create, []).call(),::VertxWeb::TimeoutHandler) elsif timeout.class == Fixnum && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::TimeoutHandler.java_method(:create, [Java::long.java_class]).call(timeout),::VertxWeb::TimeoutHandler) end raise ArgumentError, "Invalid arguments when calling create(timeout)" end |
Instance Method Details
- (void) handle(arg0 = nil)
This method returns an undefined value.
20 21 22 23 24 25 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/timeout_handler.rb', line 20 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 |