Class: Vertx::SocketAddress

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/socket_address.rb

Overview

The address of a socket

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


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

def @@j_api_type.accept?(obj)
  obj.class == SocketAddress
end

+ (Object) j_api_type



26
27
28
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/socket_address.rb', line 26

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



29
30
31
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/socket_address.rb', line 29

def self.j_class
  Java::IoVertxCoreNet::SocketAddress.java_class
end

+ (Object) unwrap(obj)



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

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



20
21
22
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/socket_address.rb', line 20

def @@j_api_type.wrap(obj)
  SocketAddress.new(obj)
end

Instance Method Details

- (String) host

Returns:

  • (String)

Raises:

  • (ArgumentError)


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

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

- (Fixnum) port

Returns:

  • (Fixnum)

Raises:

  • (ArgumentError)


40
41
42
43
44
45
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/socket_address.rb', line 40

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