Class List Method List File List

# Class: VertxWeb::SockJSSocket

Inherits:
  Object
  - Object
  - VertxWeb::SockJSSocket
  show all
Includes:
  Vertx::ReadStream, Vertx::WriteStream
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb

## Instance Method Summary (collapse)

- - (Object) close
- - (Object) drain_handler
- - (Object) end(t = nil)
- - (Object) end_handler
- - (Object) exception_handler
- - (Object) handler
- - (Object) headers
- - (SockJSSocket) initialize(j_del) constructor
  A new instance of SockJSSocket.
- - (Object) j_del
- - (Object) local_address
- - (Object) pause
- - (Object) remote_address
- - (Object) resume
- - (Object) set_write_queue_max_size(maxSize = nil)
- - (Object) uri
- - (Object) web_session
- - (Object) web_user
- - (Object) write(data = nil)
- - (Object) write_handler_id
- - (Boolean) write_queue_full?

## Constructor Details

### - (`SockJSSocket`) initialize(j_del)

Returns a new instance of SockJSSocket

    23
    24
    25
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 23

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) close

Raises:

- (`ArgumentError`)

    133
    134
    135
    136
    137
    138
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 133

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

### - (`Object`) drain_handler

Raises:

- (`ArgumentError`)

    111
    112
    113
    114
    115
    116
    117
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 111

    def drain_handler
      if block_given?
        @j_del.java_method(:drainHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling drain_handler()"
    end

### - (`Object`) end(t = nil)

Raises:

- (`ArgumentError`)

    33
    34
    35
    36
    37
    38
    39
    40
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 33

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

### - (`Object`) end_handler

Raises:

- (`ArgumentError`)

    84
    85
    86
    87
    88
    89
    90
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 84

    def end_handler
      if block_given?
        @j_del.java_method(:endHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling end_handler()"
    end

### - (`Object`) exception_handler

Raises:

- (`ArgumentError`)

    50
    51
    52
    53
    54
    55
    56
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 50

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

### - (`Object`) handler

Raises:

- (`ArgumentError`)

    59
    60
    61
    62
    63
    64
    65
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 59

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

### - (`Object`) headers

Raises:

- (`ArgumentError`)

    158
    159
    160
    161
    162
    163
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 158

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

### - (`Object`) j_del

    28
    29
    30
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 28

    def j_del
      @j_del
    end

### - (`Object`) local_address

Raises:

- (`ArgumentError`)

    149
    150
    151
    152
    153
    154
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 149

    def local_address
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:localAddress, []).call(),::Vertx::SocketAddress)
      end
      raise ArgumentError, "Invalid arguments when calling local_address()"
    end

### - (`Object`) pause

Raises:

- (`ArgumentError`)

    67
    68
    69
    70
    71
    72
    73
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 67

    def pause
      if !block_given?
        @j_del.java_method(:pause, []).call()
        return self
      end
      raise ArgumentError, "Invalid arguments when calling pause()"
    end

### - (`Object`) remote_address

Raises:

- (`ArgumentError`)

    141
    142
    143
    144
    145
    146
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 141

    def remote_address
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:remoteAddress, []).call(),::Vertx::SocketAddress)
      end
      raise ArgumentError, "Invalid arguments when calling remote_address()"
    end

### - (`Object`) resume

Raises:

- (`ArgumentError`)

    75
    76
    77
    78
    79
    80
    81
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 75

    def resume
      if !block_given?
        @j_del.java_method(:resume, []).call()
        return self
      end
      raise ArgumentError, "Invalid arguments when calling resume()"
    end

### - (`Object`) set_write_queue_max_size(maxSize = nil)

Raises:

- (`ArgumentError`)

    102
    103
    104
    105
    106
    107
    108
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 102

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

### - (`Object`) uri

Raises:

- (`ArgumentError`)

    166
    167
    168
    169
    170
    171
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 166

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

### - (`Object`) web_session

Raises:

- (`ArgumentError`)

    173
    174
    175
    176
    177
    178
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 173

    def web_session
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:webSession, []).call(),::VertxWeb::Session)
      end
      raise ArgumentError, "Invalid arguments when calling web_session()"
    end

### - (`Object`) web_user

Raises:

- (`ArgumentError`)

    180
    181
    182
    183
    184
    185
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 180

    def web_user
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:webUser, []).call(),::VertxAuthCommon::User)
      end
      raise ArgumentError, "Invalid arguments when calling web_user()"
    end

### - (`Object`) write(data = nil)

Raises:

- (`ArgumentError`)

    93
    94
    95
    96
    97
    98
    99
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 93

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

### - (`Object`) write_handler_id

Raises:

- (`ArgumentError`)

    125
    126
    127
    128
    129
    130
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/sock_js_socket.rb', line 125

    def write_handler_id
      if !block_given?
        return @j_del.java_method(:writeHandlerID, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling write_handler_id()"
    end

### - (`Boolean`) write_queue_full?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

    def write_queue_full?
      if !block_given?
        return @j_del.java_method(:writeQueueFull, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling write_queue_full?()"
    end