Class: VertxWeb::LoggerHandler
- Inherits:
-
Object
- Object
- VertxWeb::LoggerHandler
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/logger_handler.rb
Overview
A handler which logs request information to the Vert.x logger.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (::VertxWeb::LoggerHandler) create(param_1 = nil, param_2 = nil)
Create a handler with he specified format.
- + (Object) DEFAULT_FORMAT
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (void) handle(event = nil)
Something has happened, so handle it.
Class Method Details
+ (Boolean) accept?(obj)
18 19 20 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/logger_handler.rb', line 18 def @@j_api_type.accept?(obj) obj.class == LoggerHandler end |
+ (::VertxWeb::LoggerHandler) create + (::VertxWeb::LoggerHandler) create(format) + (::VertxWeb::LoggerHandler) create(immediate, format)
Create a handler with he specified format
50 51 52 53 54 55 56 57 58 59 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/logger_handler.rb', line 50 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::LoggerHandler.java_method(:create, []).call(),::VertxWeb::LoggerHandler) elsif param_1.class == Symbol && !block_given? && param_2 == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::LoggerHandler.java_method(:create, [Java::IoVertxExtWebHandler::LoggerFormat.java_class]).call(Java::IoVertxExtWebHandler::LoggerFormat.valueOf(param_1.to_s)),::VertxWeb::LoggerHandler) elsif (param_1.class == TrueClass || param_1.class == FalseClass) && param_2.class == Symbol && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::LoggerHandler.java_method(:create, [Java::boolean.java_class,Java::IoVertxExtWebHandler::LoggerFormat.java_class]).call(param_1,Java::IoVertxExtWebHandler::LoggerFormat.valueOf(param_2.to_s)),::VertxWeb::LoggerHandler) end raise ArgumentError, "Invalid arguments when calling create(#{param_1},#{param_2})" end |
+ (Object) DEFAULT_FORMAT
60 61 62 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/logger_handler.rb', line 60 def self.DEFAULT_FORMAT Java::IoVertxExtWebHandler::LoggerHandler.DEFAULT_FORMAT.name.intern 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/logger_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/logger_handler.rb', line 30 def self.j_class Java::IoVertxExtWebHandler::LoggerHandler.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/logger_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/logger_handler.rb', line 21 def @@j_api_type.wrap(obj) LoggerHandler.new(obj) end |
Instance Method Details
- (void) handle(event = nil)
This method returns an undefined value.
Something has happened, so handle it.
36 37 38 39 40 41 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/logger_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 |