Class: VertxWeb::VirtualHostHandler

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/virtual_host_handler.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (VirtualHostHandler) initialize(j_del)

Returns a new instance of VirtualHostHandler


9
10
11
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/virtual_host_handler.rb', line 9

def initialize(j_del)
  @j_del = j_del
end

Class Method Details

+ (Object) create(hostname = nil)

Raises:

  • (ArgumentError)


29
30
31
32
33
34
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/virtual_host_handler.rb', line 29

def self.create(hostname=nil)
  if hostname.class == String && block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::VirtualHostHandler.java_method(:create, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(hostname,(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxWeb::RoutingContext)) })),::VertxWeb::VirtualHostHandler)
  end
  raise ArgumentError, "Invalid arguments when calling create(hostname)"
end

Instance Method Details

- (Object) handle(arg0 = nil)

Raises:

  • (ArgumentError)


19
20
21
22
23
24
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/virtual_host_handler.rb', line 19

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

- (Object) j_del



14
15
16
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/virtual_host_handler.rb', line 14

def j_del
  @j_del
end