Class List Method List File List

# Class: VertxWeb::BodyHandler

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

## Class Method Summary (collapse)

- + (Object) create(uploadDirectory = nil)

## Instance Method Summary (collapse)

- - (Object) handle(arg0 = nil)
- - (BodyHandler) initialize(j_del) constructor
  A new instance of BodyHandler.
- - (Object) j_del
- - (Object) set_body_limit(bodyLimit = nil)
- - (Object) set_delete_uploaded_files_on_end(deleteUploadedFilesOnEnd = nil)
- - (Object) set_merge_form_attributes(mergeFormAttributes = nil)
- - (Object) set_uploads_directory(uploadsDirectory = nil)

## Constructor Details

### - (`BodyHandler`) initialize(j_del)

Returns a new instance of BodyHandler

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

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(uploadDirectory = nil)

Raises:

- (`ArgumentError`)

    30
    31
    32
    33
    34
    35
    36
    37
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/body_handler.rb', line 30

    def self.create(uploadDirectory=nil)
      if !block_given? && uploadDirectory == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::BodyHandler.java_method(:create, []).call(),::VertxWeb::BodyHandler)
      elsif uploadDirectory.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::BodyHandler.java_method(:create, [Java::java.lang.String.java_class]).call(uploadDirectory),::VertxWeb::BodyHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(uploadDirectory)"
    end

## Instance Method Details

### - (`Object`) handle(arg0 = nil)

Raises:

- (`ArgumentError`)

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

    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

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

    def j_del
      @j_del
    end

### - (`Object`) set_body_limit(bodyLimit = nil)

Raises:

- (`ArgumentError`)

    41
    42
    43
    44
    45
    46
    47
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/body_handler.rb', line 41

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

### - (`Object`) set_delete_uploaded_files_on_end(deleteUploadedFilesOnEnd = nil)

Raises:

- (`ArgumentError`)

    71
    72
    73
    74
    75
    76
    77
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/body_handler.rb', line 71

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

### - (`Object`) set_merge_form_attributes(mergeFormAttributes = nil)

Raises:

- (`ArgumentError`)

    61
    62
    63
    64
    65
    66
    67
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/body_handler.rb', line 61

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

### - (`Object`) set_uploads_directory(uploadsDirectory = nil)

Raises:

- (`ArgumentError`)

    51
    52
    53
    54
    55
    56
    57
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/body_handler.rb', line 51

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