Class List Method List File List

# Class: VertxShell::SockJSTermHandler

Inherits:
  Object
  - Object
  - VertxShell::SockJSTermHandler
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/sock_js_term_handler.rb

## Overview

@author Julien Viet

## Class Method Summary (collapse)

- + (::VertxShell::SockJSTermHandler) create(vertx = nil, charset = nil)

## Instance Method Summary (collapse)

- - (void) handle(arg0 = nil)
- - (self) term_handler { ... }

## Class Method Details

### + (`::VertxShell::SockJSTermHandler`) create(vertx = nil, charset = nil)

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`)
- charset (`String`) (defaults to: `nil`)

Returns:

- (`::VertxShell::SockJSTermHandler`)

Raises:

- (`ArgumentError`)

    30
    31
    32
    33
    34
    35
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/sock_js_term_handler.rb', line 30

    def self.create(vertx=nil,charset=nil)
      if vertx.class.method_defined?(:j_del) && charset.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::SockJSTermHandler.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,charset),::VertxShell::SockJSTermHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(vertx,charset)"
    end

## Instance Method Details

### - (`void`) handle(arg0 = nil)

This method returns an undefined value.

Parameters:

- arg0 (`::VertxWeb::SockJSSocket`) (defaults to: `nil`)

Raises:

- (`ArgumentError`)

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

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

### - (`self`) term_handler { ... }

Yields:

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    38
    39
    40
    41
    42
    43
    44
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/sock_js_term_handler.rb', line 38

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