Class: VertxRabbitmq::RabbitMQMessage

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

Overview

Represent a message received message received in a rabbitmq-queue.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


20
21
22
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 20

def @@j_api_type.accept?(obj)
  obj.class == RabbitMQMessage
end

+ (Object) j_api_type



29
30
31
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 29

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 32

def self.j_class
  Java::IoVertxRabbitmq::RabbitMQMessage.java_class
end

+ (Object) unwrap(obj)



26
27
28
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 26

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



23
24
25
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 23

def @@j_api_type.wrap(obj)
  RabbitMQMessage.new(obj)
end

Instance Method Details

- (::Vertx::Buffer) body

Returns the message body

Returns:

Raises:

  • (ArgumentError)


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

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

- (String) consumer_tag

Returns the consumer tag associated with the consumer

Returns:

  • (String)
    the consumer tag associated with the consumer

Raises:

  • (ArgumentError)


46
47
48
49
50
51
52
53
54
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 46

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

- (::VertxRabbitmq::Envelope) envelope

Returns packaging data for the message

Returns:

Raises:

  • (ArgumentError)


56
57
58
59
60
61
62
63
64
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 56

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

- (::VertxRabbitmq::BasicProperties) properties

Returns content header data for the message

Returns:

Raises:

  • (ArgumentError)


66
67
68
69
70
71
72
73
74
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-rabbitmq/rabbit_mq_message.rb', line 66

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