Class: Wamp::Client::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.
1230 1231 1232 1233 1234 1235 1236 1237 1238 |
# File 'lib/wamp/client/message.rb', line 1230 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.
1228 1229 1230 |
# File 'lib/wamp/client/message.rb', line 1228 def invocation_request @invocation_request end |
#options ⇒ Object
Returns the value of attribute options.
1228 1229 1230 |
# File 'lib/wamp/client/message.rb', line 1228 def @options end |
Class Method Details
.parse(params) ⇒ Object
1244 1245 1246 1247 1248 1249 1250 1251 1252 |
# File 'lib/wamp/client/message.rb', line 1244 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
1254 1255 1256 1257 1258 1259 1260 1261 |
# File 'lib/wamp/client/message.rb', line 1254 def payload payload = [self.class.type] payload.push(self.invocation_request) payload.push(self.) payload end |
#to_s ⇒ Object
1263 1264 1265 |
# File 'lib/wamp/client/message.rb', line 1263 def to_s 'INTERRUPT > ' + self.payload.to_s end |