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.
1308 1309 1310 1311 1312 1313 1314 1315 1316 |
# File 'lib/wamp_client/message.rb', line 1308 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.
1306 1307 1308 |
# File 'lib/wamp_client/message.rb', line 1306 def invocation_request @invocation_request end |
#options ⇒ Object
Returns the value of attribute options.
1306 1307 1308 |
# File 'lib/wamp_client/message.rb', line 1306 def @options end |
Class Method Details
.parse(params) ⇒ Object
1322 1323 1324 1325 1326 1327 1328 1329 1330 |
# File 'lib/wamp_client/message.rb', line 1322 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 |
Instance Method Details
#payload ⇒ Object
1332 1333 1334 1335 1336 1337 1338 1339 |
# File 'lib/wamp_client/message.rb', line 1332 def payload payload = [self.class.type] payload.push(self.invocation_request) payload.push(self.) payload end |
#to_s ⇒ Object
1341 1342 1343 |
# File 'lib/wamp_client/message.rb', line 1341 def to_s 'INTERRUPT > ' + self.payload.to_s end |