Class List Method List File List

# Class: Vertx::PacketWritestream

Inherits:
  Object
  - Object
  - Vertx::PacketWritestream
  show all
Includes:
  WriteStream
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/packet_writestream.rb

## Instance Method Summary (collapse)

- - (Object) drain_handler
- - (Object) end(t = nil)
- - (Object) exception_handler
- - (PacketWritestream) initialize(j_del) constructor
  A new instance of PacketWritestream.
- - (Object) j_del
- - (Object) set_write_queue_max_size(maxSize = nil)
- - (Object) write(data = nil)
- - (Boolean) write_queue_full?

## Constructor Details

### - (`PacketWritestream`) initialize(j_del)

Returns a new instance of PacketWritestream

    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/packet_writestream.rb', line 12

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) drain_handler

Raises:

- (`ArgumentError`)

    68
    69
    70
    71
    72
    73
    74
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/packet_writestream.rb', line 68

    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`)

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

    def end(t=nil)
      if !block_given? && t == nil
        return @j_del.java_method(:end, []).call()
      elsif t.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:end, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(t.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling end(t)"
    end

### - (`Object`) exception_handler

Raises:

- (`ArgumentError`)

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

    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`) j_del

    17
    18
    19
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/packet_writestream.rb', line 17

    def j_del
      @j_del
    end

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

Raises:

- (`ArgumentError`)

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

    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`)

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

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

### - (`Boolean`) write_queue_full?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

    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