Class: Vertx::DeliveryContext

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/delivery_context.rb

Overview

Encapsulates a message being delivered by Vert.x as well as providing control over the message delivery.

Used with event bus interceptors.

Instance Method Summary (collapse)

Instance Method Details

- (Object) body

Returns the value delivered by the message (before or after being processed by the codec)

Returns:

  • (Object)
    the value delivered by the message (before or after being processed by the codec)

Raises:

  • (ArgumentError)


44
45
46
47
48
49
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/delivery_context.rb', line 44

def body
  if !block_given?
    return ::Vertx::Util::Utils.from_object(@j_del.java_method(:body, []).call())
  end
  raise ArgumentError, "Invalid arguments when calling body()"
end

- (::Vertx::Message) message

Returns The message being delivered

Returns:

Raises:

  • (ArgumentError)


22
23
24
25
26
27
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/delivery_context.rb', line 22

def message
  if !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:message, []).call(),::Vertx::Message, nil)
  end
  raise ArgumentError, "Invalid arguments when calling message()"
end

- (void) next

This method returns an undefined value.

Call the next interceptor

Raises:

  • (ArgumentError)


30
31
32
33
34
35
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/delivery_context.rb', line 30

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

- (true, false) send?

Returns true if the message is being sent (point to point) or False if the message is being published

Returns:

  • (true, false)
    true if the message is being sent (point to point) or False if the message is being published

Raises:

  • (ArgumentError)


37
38
39
40
41
42
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/delivery_context.rb', line 37

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