Class List Method List File List

# Module: Vertx::WriteStream

Includes:
  StreamBase
Included in:
  AsyncFile, HttpClientRequest, HttpServerResponse, MessageProducer, NetSocket, PacketWritestream, WebSocketBase, WriteStreamImpl, VertxWeb::SockJSSocket
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/write_stream.rb

## Instance Method Summary (collapse)

- - (Object) drain_handler
- - (Object) end(t = nil)
- - (Object) exception_handler
- - (Object) set_write_queue_max_size(maxSize = nil)
- - (Object) write(data = nil)
- - (Boolean) write_queue_full?

## Instance Method Details

### - (`Object`) drain_handler

Raises:

- (`ArgumentError`)

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

    def drain_handler
      if block_given?
        @j_del.java_method(:drainHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling drain_handler()"
    end

### - (`Object`) end(t = nil)

Raises:

- (`ArgumentError`)

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

    def end(t=nil)
      if !block_given? && t == nil
        return @j_del.java_method(:end, []).call()
      elsif (t.class == String  || t.class == Hash || t.class == Array || t.class == NilClass || t.class == TrueClass || t.class == FalseClass || t.class == Fixnum || t.class == Float) && !block_given?
        return @j_del.java_method(:end, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(t))
      end
      raise ArgumentError, "Invalid arguments when calling end(t)"
    end

### - (`Object`) exception_handler

Raises:

- (`ArgumentError`)

    10
    11
    12
    13
    14
    15
    16
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/write_stream.rb', line 10

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

### - (`Object`) set_write_queue_max_size(maxSize = nil)

Raises:

- (`ArgumentError`)

    49
    50
    51
    52
    53
    54
    55
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/write_stream.rb', line 49

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

### - (`Object`) write(data = nil)

Raises:

- (`ArgumentError`)

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

    def write(data=nil)
      if (data.class == String  || data.class == Hash || data.class == Array || data.class == NilClass || data.class == TrueClass || data.class == FalseClass || data.class == Fixnum || data.class == Float) && !block_given?
        @j_del.java_method(:write, [Java::java.lang.Object.java_class]).call(::Vertx::Util::Utils.to_object(data))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling write(data)"
    end

### - (`Boolean`) write_queue_full?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    58
    59
    60
    61
    62
    63
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/write_stream.rb', line 58

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