Class: VertxStomp::StompServerConnection

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

Instance Method Summary (collapse)

Constructor Details

- (StompServerConnection) initialize(j_del)

Returns a new instance of StompServerConnection


12
13
14
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_connection.rb', line 12

def initialize(j_del)
  @j_del = j_del
end

Instance Method Details

- (Object) close

Raises:

  • (ArgumentError)


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

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

- (Object) configure_heartbeat(ping = nil, pong = nil)

Raises:

  • (ArgumentError)


87
88
89
90
91
92
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_connection.rb', line 87

def configure_heartbeat(ping=nil,pong=nil)
  if ping.class == Fixnum && pong.class == Fixnum && block_given?
    return @j_del.java_method(:configureHeartbeat, [Java::long.java_class,Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(ping,pong,(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxStomp::StompServerConnection)) }))
  end
  raise ArgumentError, "Invalid arguments when calling configure_heartbeat(ping,pong)"
end

- (Object) handler

Raises:

  • (ArgumentError)


44
45
46
47
48
49
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_connection.rb', line 44

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

- (Object) j_del



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

def j_del
  @j_del
end

- (Object) on_server_activity

Raises:

  • (ArgumentError)


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

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

- (Object) ping

Raises:

  • (ArgumentError)


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

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

- (Object) server

Raises:

  • (ArgumentError)


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

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

- (Object) session

Raises:

  • (ArgumentError)


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

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

- (Object) write(param_1 = nil)

Raises:

  • (ArgumentError)


26
27
28
29
30
31
32
33
34
35
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_connection.rb', line 26

def write(param_1=nil)
  if param_1.class == Hash && !block_given?
    @j_del.java_method(:write, [Java::IoVertxExtStomp::Frame.java_class]).call(Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(param_1)))
    return self
  elsif param_1.class.method_defined?(:j_del) && !block_given?
    @j_del.java_method(:write, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(param_1.j_del)
    return self
  end
  raise ArgumentError, "Invalid arguments when calling write(param_1)"
end