Class List Method List File List

# Class: Vertx::Pump

Inherits:
  Object
  - Object
  - Vertx::Pump
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/pump.rb

## Class Method Summary (collapse)

- + (Object) pump(rs = nil, ws = nil, writeQueueMaxSize = nil)

## Instance Method Summary (collapse)

- - (Pump) initialize(j_del) constructor
  A new instance of Pump.
- - (Object) j_del
- - (Object) number_pumped
- - (Object) set_write_queue_max_size(maxSize = nil)
- - (Object) start
- - (Object) stop

## Constructor Details

### - (`Pump`) initialize(j_del)

Returns a new instance of Pump

    27
    28
    29
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/pump.rb', line 27

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) pump(rs = nil, ws = nil, writeQueueMaxSize = nil)

Raises:

- (`ArgumentError`)

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

    def self.pump(rs=nil,ws=nil,writeQueueMaxSize=nil)
      if rs.class.method_defined?(:j_del) && ws.class.method_defined?(:j_del) && !block_given? && writeQueueMaxSize == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreStreams::Pump.java_method(:pump, [Java::IoVertxCoreStreams::ReadStream.java_class,Java::IoVertxCoreStreams::WriteStream.java_class]).call(rs.j_del,ws.j_del),::Vertx::Pump)
      elsif rs.class.method_defined?(:j_del) && ws.class.method_defined?(:j_del) && writeQueueMaxSize.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreStreams::Pump.java_method(:pump, [Java::IoVertxCoreStreams::ReadStream.java_class,Java::IoVertxCoreStreams::WriteStream.java_class,Java::int.java_class]).call(rs.j_del,ws.j_del,writeQueueMaxSize),::Vertx::Pump)
      end
      raise ArgumentError, "Invalid arguments when calling pump(rs,ws,writeQueueMaxSize)"
    end

## Instance Method Details

### - (`Object`) j_del

    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/pump.rb', line 32

    def j_del
      @j_del
    end

### - (`Object`) number_pumped

Raises:

- (`ArgumentError`)

    79
    80
    81
    82
    83
    84
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/pump.rb', line 79

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

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

Raises:

- (`ArgumentError`)

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

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

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) stop

Raises:

- (`ArgumentError`)

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

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