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

## Class Method Summary (collapse)

- + (Object) create(vertx = nil, charset = nil)

## Instance Method Summary (collapse)

- - (Object) handle(arg0 = nil)
- - (SockJSTermHandler) initialize(j_del) constructor
  A new instance of SockJSTermHandler.
- - (Object) j_del
- - (Object) term_handler

## Constructor Details

### - (`SockJSTermHandler`) initialize(j_del)

Returns a new instance of SockJSTermHandler

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/sock_js_term_handler.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(vertx = nil, charset = nil)

Raises:

- (`ArgumentError`)

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

    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

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

Raises:

- (`ArgumentError`)

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

    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

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/sock_js_term_handler.rb', line 15

    def j_del
      @j_del
    end

### - (`Object`) term_handler

Raises:

- (`ArgumentError`)

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

    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