Class: ReactivePgClient::PgStream

Inherits:
Object
  • Object
show all
Includes:
Vertx::ReadStream
Defined in:
/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb

Overview

A row oriented stream.

Instance Method Summary (collapse)

Instance Method Details

- (void) close { ... }

This method returns an undefined value.

Close the stream and release the resources.

Yields:

  • the completion handler for this operation

Raises:

  • (ArgumentError)

74
75
76
77
78
79
80
81
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb', line 74

def close
  if !block_given?
    return @j_del.java_method(:close, []).call()
  elsif block_given?
    return @j_del.java_method(:close, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
  end
  raise ArgumentError, "Invalid arguments when calling close()"
end

- (self) end_handler { ... }

Yields:

Returns:

  • (self)

Raises:

  • (ArgumentError)

64
65
66
67
68
69
70
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb', line 64

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

- (self) exception_handler { ... }

Yields:

Returns:

  • (self)

Raises:

  • (ArgumentError)

30
31
32
33
34
35
36
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb', line 30

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

- (self) fetch(arg0 = nil)

Parameters:

  • arg0 (Fixnum) (defaults to: nil)

Returns:

  • (self)

Raises:

  • (ArgumentError)

21
22
23
24
25
26
27
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb', line 21

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

- (self) handler { ... }

Yields:

Returns:

  • (self)

Raises:

  • (ArgumentError)

39
40
41
42
43
44
45
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb', line 39

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

- (self) pause

Returns:

  • (self)

Raises:

  • (ArgumentError)

47
48
49
50
51
52
53
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb', line 47

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

- (self) resume

Returns:

  • (self)

Raises:

  • (ArgumentError)

55
56
57
58
59
60
61
# File '/Users/julien/java/reactive-pg-client/target/classes/reactive-pg-client/pg_stream.rb', line 55

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