Class: WampClient::Message::Interrupt
- Defined in:
- lib/wamp_client/message.rb
Overview
Interrupt The “INTERRUPT” message is used with the Call Canceling advanced feature. Upon receiving a cancel for a pending call, a Dealer will issue an interrupt to the Callee. Formats:
[INTERRUPT, INVOCATION.Request|id, Options|dict]
Instance Attribute Summary collapse
-
#invocation_request ⇒ Object
Returns the value of attribute invocation_request.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(invocation_request, options) ⇒ Interrupt
constructor
A new instance of Interrupt.
- #payload ⇒ Object
- #to_s ⇒ Object
Methods included from Check
Constructor Details
#initialize(invocation_request, options) ⇒ Interrupt
Returns a new instance of Interrupt.
1271 1272 1273 1274 1275 1276 1277 1278 1279 |
# File 'lib/wamp_client/message.rb', line 1271 def initialize(invocation_request, ) self.class.check_id('invocation_request', invocation_request) self.class.check_dict('options', ) self.invocation_request = invocation_request self. = end |
Instance Attribute Details
#invocation_request ⇒ Object
Returns the value of attribute invocation_request.
1269 1270 1271 |
# File 'lib/wamp_client/message.rb', line 1269 def invocation_request @invocation_request end |
#options ⇒ Object
Returns the value of attribute options.
1269 1270 1271 |
# File 'lib/wamp_client/message.rb', line 1269 def end |
Class Method Details
.parse(params) ⇒ Object
1285 1286 1287 1288 1289 1290 1291 1292 1293 |
# File 'lib/wamp_client/message.rb', line 1285 def self.parse(params) self.check_gte('params list', 3, params.count) self.check_equal('message type', self.type, params[0]) params.shift self.new(*params) end |
.type ⇒ Object
1281 1282 1283 |
# File 'lib/wamp_client/message.rb', line 1281 def self.type Types::INTERRUPT end |
Instance Method Details
#payload ⇒ Object
1295 1296 1297 1298 1299 1300 1301 |
# File 'lib/wamp_client/message.rb', line 1295 def payload payload = [self.class.type] payload.push(self.invocation_request) payload.push(self.) payload end |
#to_s ⇒ Object
1303 1304 1305 |
# File 'lib/wamp_client/message.rb', line 1303 def to_s 'INTERRUPT > ' + self.payload.to_s end |