Class List Method List File List

# Class: Vertx::RecordParser

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

## Class Method Summary (collapse)

- + (Object) new_delimited(param_1 = nil)
- + (Object) new_fixed(size = nil)

## Instance Method Summary (collapse)

- - (Object) delimited_mode(param_1 = nil)
- - (Object) fixed_size_mode(size = nil)
- - (Object) handle(buffer = nil)
- - (RecordParser) initialize(j_del) constructor
  A new instance of RecordParser.
- - (Object) j_del
- - (Object) set_output

## Constructor Details

### - (`RecordParser`) initialize(j_del)

Returns a new instance of RecordParser

    37
    38
    39
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 37

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) new_delimited(param_1 = nil)

Raises:

- (`ArgumentError`)

    64
    65
    66
    67
    68
    69
    70
    71
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 64

    def self.new_delimited(param_1=nil)
      if param_1.class == String && block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreParsetools::RecordParser.java_method(:newDelimited, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::Buffer)) })),::Vertx::RecordParser)
      elsif param_1.class.method_defined?(:j_del) && block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreParsetools::RecordParser.java_method(:newDelimited, [Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1.j_del,(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::Buffer)) })),::Vertx::RecordParser)
      end
      raise ArgumentError, "Invalid arguments when calling new_delimited(param_1)"
    end

### + (`Object`) new_fixed(size = nil)

Raises:

- (`ArgumentError`)

    79
    80
    81
    82
    83
    84
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 79

    def self.new_fixed(size=nil)
      if size.class == Fixnum && block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreParsetools::RecordParser.java_method(:newFixed, [Java::int.java_class,Java::IoVertxCore::Handler.java_class]).call(size,(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::Buffer)) })),::Vertx::RecordParser)
      end
      raise ArgumentError, "Invalid arguments when calling new_fixed(size)"
    end

## Instance Method Details

### - (`Object`) delimited_mode(param_1 = nil)

Raises:

- (`ArgumentError`)

    94
    95
    96
    97
    98
    99
    100
    101
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 94

    def delimited_mode(param_1=nil)
      if param_1.class == String && !block_given?
        return @j_del.java_method(:delimitedMode, [Java::java.lang.String.java_class]).call(param_1)
      elsif param_1.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:delimitedMode, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(param_1.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling delimited_mode(param_1)"
    end

### - (`Object`) fixed_size_mode(size = nil)

Raises:

- (`ArgumentError`)

    107
    108
    109
    110
    111
    112
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 107

    def fixed_size_mode(size=nil)
      if size.class == Fixnum && !block_given?
        return @j_del.java_method(:fixedSizeMode, [Java::int.java_class]).call(size)
      end
      raise ArgumentError, "Invalid arguments when calling fixed_size_mode(size)"
    end

### - (`Object`) handle(buffer = nil)

Raises:

- (`ArgumentError`)

    116
    117
    118
    119
    120
    121
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 116

    def handle(buffer=nil)
      if buffer.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:handle, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(buffer.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling handle(buffer)"
    end

### - (`Object`) j_del

    42
    43
    44
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 42

    def j_del
      @j_del
    end

### - (`Object`) set_output

Raises:

- (`ArgumentError`)

    47
    48
    49
    50
    51
    52
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/record_parser.rb', line 47

    def set_output
      if block_given?
        return @j_del.java_method(:setOutput, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::Buffer)) }))
      end
      raise ArgumentError, "Invalid arguments when calling set_output()"
    end