Class List Method List File List

# Class: VertxStomp::Frames

Inherits:
  Object
  - Object
  - VertxStomp::Frames
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/frames.rb

## Class Method Summary (collapse)

- + (Object) create_error_frame(message = nil, headers = nil, body = nil)
- + (Object) create_receipt_frame(receiptId = nil, headers = nil)
- + (Object) handle_receipt(frame = nil, connection = nil)
- + (Object) ping

## Instance Method Summary (collapse)

- - (Frames) initialize(j_del) constructor
  A new instance of Frames.
- - (Object) j_del

## Constructor Details

### - (`Frames`) initialize(j_del)

Returns a new instance of Frames

    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/frames.rb', line 12

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create_error_frame(message = nil, headers = nil, body = nil)

Raises:

- (`ArgumentError`)

    24
    25
    26
    27
    28
    29
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/frames.rb', line 24

    def self.create_error_frame(message=nil,headers=nil,body=nil)
      if message.class == String && headers.class == Hash && body.class == String && !block_given?
        return Java::IoVertxExtStomp::Frames.java_method(:createErrorFrame, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::java.lang.String.java_class]).call(message,Hash[headers.map { |k,v| [k,v] }],body) != nil ? JSON.parse(Java::IoVertxExtStomp::Frames.java_method(:createErrorFrame, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::java.lang.String.java_class]).call(message,Hash[headers.map { |k,v| [k,v] }],body).toJson.encode) : nil
      end
      raise ArgumentError, "Invalid arguments when calling create_error_frame(message,headers,body)"
    end

### + (`Object`) create_receipt_frame(receiptId = nil, headers = nil)

Raises:

- (`ArgumentError`)

    33
    34
    35
    36
    37
    38
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/frames.rb', line 33

    def self.create_receipt_frame(receiptId=nil,headers=nil)
      if receiptId.class == String && headers.class == Hash && !block_given?
        return Java::IoVertxExtStomp::Frames.java_method(:createReceiptFrame, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class]).call(receiptId,Hash[headers.map { |k,v| [k,v] }]) != nil ? JSON.parse(Java::IoVertxExtStomp::Frames.java_method(:createReceiptFrame, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class]).call(receiptId,Hash[headers.map { |k,v| [k,v] }]).toJson.encode) : nil
      end
      raise ArgumentError, "Invalid arguments when calling create_receipt_frame(receiptId,headers)"
    end

### + (`Object`) handle_receipt(frame = nil, connection = nil)

Raises:

- (`ArgumentError`)

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

    def self.handle_receipt(frame=nil,connection=nil)
      if frame.class == Hash && connection.class.method_defined?(:j_del) && !block_given?
        return Java::IoVertxExtStomp::Frames.java_method(:handleReceipt, [Java::IoVertxExtStomp::Frame.java_class,Java::IoVertxExtStomp::StompServerConnection.java_class]).call(Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(frame)),connection.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling handle_receipt(frame,connection)"
    end

### + (`Object`) ping

Raises:

- (`ArgumentError`)

    49
    50
    51
    52
    53
    54
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/frames.rb', line 49

    def self.ping
      if !block_given?
        return Java::IoVertxExtStomp::Frames.java_method(:ping, []).call() != nil ? JSON.parse(Java::IoVertxExtStomp::Frames.java_method(:ping, []).call().toJson.encode) : nil
      end
      raise ArgumentError, "Invalid arguments when calling ping()"
    end

## Instance Method Details

### - (`Object`) j_del

    17
    18
    19
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/frames.rb', line 17

    def j_del
      @j_del
    end