Class List Method List File List

# Class: VertxWeb::Route

Inherits:
  Object
  - Object
  - VertxWeb::Route
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb

## Instance Method Summary (collapse)

- - (Object) blocking_handler(requestHandler = nil, ordered = nil)
- - (Object) consumes(contentType = nil)
- - (Object) disable
- - (Object) enable
- - (Object) failure_handler
- - (Object) get_path
- - (Object) handler
- - (Route) initialize(j_del) constructor
  A new instance of Route.
- - (Object) j_del
- - (Object) last
- - (Object) method(method = nil)
- - (Object) order(order = nil)
- - (Object) path(path = nil)
- - (Object) path_regex(path = nil)
- - (Object) produces(contentType = nil)
- - (Object) remove
- - (Object) use_normalised_path(useNormalisedPath = nil)

## Constructor Details

### - (`Route`) initialize(j_del)

Returns a new instance of Route

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

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) blocking_handler(requestHandler = nil, ordered = nil)

Raises:

- (`ArgumentError`)

    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 113

    def blocking_handler(requestHandler=nil,ordered=nil)
      if block_given? && requestHandler == nil && ordered == nil
        @j_del.java_method(:blockingHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxWeb::RoutingContext)) }))
        return self
      elsif requestHandler.class == Proc && (ordered.class == TrueClass || ordered.class == FalseClass) && !block_given?
        @j_del.java_method(:blockingHandler, [Java::IoVertxCore::Handler.java_class,Java::boolean.java_class]).call((Proc.new { |event| requestHandler.call(::Vertx::Util::Utils.safe_create(event,::VertxWeb::RoutingContext)) }),ordered)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling blocking_handler(requestHandler,ordered)"
    end

### - (`Object`) consumes(contentType = nil)

Raises:

- (`ArgumentError`)

    64
    65
    66
    67
    68
    69
    70
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 64

    def consumes(contentType=nil)
      if contentType.class == String && !block_given?
        @j_del.java_method(:consumes, [Java::java.lang.String.java_class]).call(contentType)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling consumes(contentType)"
    end

### - (`Object`) disable

Raises:

- (`ArgumentError`)

    146
    147
    148
    149
    150
    151
    152
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 146

    def disable
      if !block_given?
        @j_del.java_method(:disable, []).call()
        return self
      end
      raise ArgumentError, "Invalid arguments when calling disable()"
    end

### - (`Object`) enable

Raises:

- (`ArgumentError`)

    155
    156
    157
    158
    159
    160
    161
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 155

    def enable
      if !block_given?
        @j_del.java_method(:enable, []).call()
        return self
      end
      raise ArgumentError, "Invalid arguments when calling enable()"
    end

### - (`Object`) failure_handler

Raises:

- (`ArgumentError`)

    128
    129
    130
    131
    132
    133
    134
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 128

    def failure_handler
      if block_given?
        @j_del.java_method(:failureHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxWeb::RoutingContext)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling failure_handler()"
    end

### - (`Object`) get_path

Raises:

- (`ArgumentError`)

    174
    175
    176
    177
    178
    179
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 174

    def get_path
      if !block_given?
        return @j_del.java_method(:getPath, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling get_path()"
    end

### - (`Object`) handler

Raises:

- (`ArgumentError`)

    95
    96
    97
    98
    99
    100
    101
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 95

    def handler
      if block_given?
        @j_del.java_method(:handler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxWeb::RoutingContext)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling handler()"
    end

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) last

Raises:

- (`ArgumentError`)

    83
    84
    85
    86
    87
    88
    89
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 83

    def last
      if !block_given?
        @j_del.java_method(:last, []).call()
        return self
      end
      raise ArgumentError, "Invalid arguments when calling last()"
    end

### - (`Object`) method(method = nil)

Raises:

- (`ArgumentError`)

    22
    23
    24
    25
    26
    27
    28
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 22

    def method(method=nil)
      if method.class == Symbol && !block_given?
        @j_del.java_method(:method, [Java::IoVertxCoreHttp::HttpMethod.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(method))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling method(method)"
    end

### - (`Object`) order(order = nil)

Raises:

- (`ArgumentError`)

    74
    75
    76
    77
    78
    79
    80
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 74

    def order(order=nil)
      if order.class == Fixnum && !block_given?
        @j_del.java_method(:order, [Java::int.java_class]).call(order)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling order(order)"
    end

### - (`Object`) path(path = nil)

Raises:

- (`ArgumentError`)

    33
    34
    35
    36
    37
    38
    39
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 33

    def path(path=nil)
      if path.class == String && !block_given?
        @j_del.java_method(:path, [Java::java.lang.String.java_class]).call(path)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling path(path)"
    end

### - (`Object`) path_regex(path = nil)

Raises:

- (`ArgumentError`)

    44
    45
    46
    47
    48
    49
    50
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 44

    def path_regex(path=nil)
      if path.class == String && !block_given?
        @j_del.java_method(:pathRegex, [Java::java.lang.String.java_class]).call(path)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling path_regex(path)"
    end

### - (`Object`) produces(contentType = nil)

Raises:

- (`ArgumentError`)

    54
    55
    56
    57
    58
    59
    60
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 54

    def produces(contentType=nil)
      if contentType.class == String && !block_given?
        @j_del.java_method(:produces, [Java::java.lang.String.java_class]).call(contentType)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling produces(contentType)"
    end

### - (`Object`) remove

Raises:

- (`ArgumentError`)

    137
    138
    139
    140
    141
    142
    143
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 137

    def remove
      if !block_given?
        @j_del.java_method(:remove, []).call()
        return self
      end
      raise ArgumentError, "Invalid arguments when calling remove()"
    end

### - (`Object`) use_normalised_path(useNormalisedPath = nil)

Raises:

- (`ArgumentError`)

    166
    167
    168
    169
    170
    171
    172
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/route.rb', line 166

    def use_normalised_path(useNormalisedPath=nil)
      if (useNormalisedPath.class == TrueClass || useNormalisedPath.class == FalseClass) && !block_given?
        @j_del.java_method(:useNormalisedPath, [Java::boolean.java_class]).call(useNormalisedPath)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling use_normalised_path(useNormalisedPath)"
    end