Class: Vertx::DatagramPacket
- Inherits:
-
Object
- Object
- Vertx::DatagramPacket
show all
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb
Overview
A received datagram packet (UDP) which contains the data and information about the sender of the data itself.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Class Method Details
+ (Boolean) accept?(obj)
19
20
21
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb', line 19
def @@j_api_type.accept?(obj)
obj.class == DatagramPacket
end
|
+ (Object) j_api_type
28
29
30
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb', line 28
def self.j_api_type
@@j_api_type
end
|
+ (Object) j_class
31
32
33
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb', line 31
def self.j_class
Java::IoVertxCoreDatagram::DatagramPacket.java_class
end
|
+ (Object) unwrap(obj)
25
26
27
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb', line 25
def @@j_api_type.unwrap(obj)
obj.j_del
end
|
+ (Object) wrap(obj)
22
23
24
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb', line 22
def @@j_api_type.wrap(obj)
DatagramPacket.new(obj)
end
|
Instance Method Details
45
46
47
48
49
50
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb', line 45
def data
if !block_given?
return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:data, []).call(),::Vertx::Buffer)
end
raise ArgumentError, "Invalid arguments when calling data()"
end
|
37
38
39
40
41
42
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/datagram_packet.rb', line 37
def sender
if !block_given?
return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:sender, []).call(),::Vertx::SocketAddress)
end
raise ArgumentError, "Invalid arguments when calling sender()"
end
|