Class List Method List File List

# Class: Vertx::SendContext

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

## Overview

Encapsulates a message being sent from Vert.x. Used with event bus interceptors

## Instance Method Summary (collapse)

- - (::Vertx::Message) message
  The message being sent.
- - (void) next
  Call the next interceptor.
- - (true, false) send?
  True if the message is being sent (point to point) or False if the message is being published.
- - (Object) sent_body
  The value sent or published (before being processed by the codec).

## Instance Method Details

### - (`::Vertx::Message`) message

Returns The message being sent

Returns:

- (`::Vertx::Message`) —
  The message being sent

Raises:

- (`ArgumentError`)

    20
    21
    22
    23
    24
    25
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/send_context.rb', line 20

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

    28
    29
    30
    31
    32
    33
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/send_context.rb', line 28

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

    35
    36
    37
    38
    39
    40
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/send_context.rb', line 35

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

### - (`Object`) sent_body

Returns the value sent or published (before being processed by the codec)

Returns:

- (`Object`) —
  the value sent or published (before being processed by the codec)

Raises:

- (`ArgumentError`)

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

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