Class: Quark::MdkRuntime::Actors::StartStopActor
- Inherits:
-
DatawireQuarkCore::QuarkObject
- Object
- DatawireQuarkCore::QuarkObject
- Quark::MdkRuntime::Actors::StartStopActor
- Extended by:
- DatawireQuarkCore::Static
- Defined in:
- lib/mdk_runtime/actors.rb
Overview
Start or stop an Actor.
Constant Summary
Constants included from DatawireQuarkCore::Static
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#dispatcher ⇒ Object
Returns the value of attribute dispatcher.
-
#start ⇒ Object
Returns the value of attribute start.
Instance Method Summary collapse
- #__init_fields__ ⇒ Object
- #_getClass ⇒ Object
- #_getField(name) ⇒ Object
- #_setField(name, value) ⇒ Object
- #deliver ⇒ Object
-
#initialize(actor, dispatcher, start) ⇒ StartStopActor
constructor
A new instance of StartStopActor.
- #toString ⇒ Object
Methods included from DatawireQuarkCore::Static
_lazy_statics, static, unlazy_statics
Methods inherited from DatawireQuarkCore::QuarkObject
Constructor Details
#initialize(actor, dispatcher, start) ⇒ StartStopActor
Returns a new instance of StartStopActor.
213 214 215 216 217 218 219 220 221 |
# File 'lib/mdk_runtime/actors.rb', line 213 def initialize(actor, dispatcher, start) self.__init_fields__ (self).actor = actor (self).dispatcher = dispatcher (self).start = start nil end |
Instance Attribute Details
#actor ⇒ Object
Returns the value of attribute actor.
206 207 208 |
# File 'lib/mdk_runtime/actors.rb', line 206 def actor @actor end |
#dispatcher ⇒ Object
Returns the value of attribute dispatcher.
206 207 208 |
# File 'lib/mdk_runtime/actors.rb', line 206 def dispatcher @dispatcher end |
#start ⇒ Object
Returns the value of attribute start.
206 207 208 |
# File 'lib/mdk_runtime/actors.rb', line 206 def start @start end |
Instance Method Details
#__init_fields__ ⇒ Object
286 287 288 289 290 291 292 293 |
# File 'lib/mdk_runtime/actors.rb', line 286 def __init_fields__() self.actor = nil self.dispatcher = nil self.start = nil nil end |
#_getClass ⇒ Object
248 249 250 251 252 253 |
# File 'lib/mdk_runtime/actors.rb', line 248 def _getClass() return "mdk_runtime.actors._StartStopActor" nil end |
#_getField(name) ⇒ Object
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/mdk_runtime/actors.rb', line 255 def _getField(name) if ((name) == ("actor")) return (self).actor end if ((name) == ("dispatcher")) return (self).dispatcher end if ((name) == ("start")) return (self).start end return nil nil end |
#_setField(name, value) ⇒ Object
271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/mdk_runtime/actors.rb', line 271 def _setField(name, value) if ((name) == ("actor")) (self).actor = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_runtime.actors.Actor } end if ((name) == ("dispatcher")) (self).dispatcher = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_runtime.actors.MessageDispatcher } end if ((name) == ("start")) (self).start = ::DatawireQuarkCore.cast(value) { ::Object } end nil end |
#deliver ⇒ Object
237 238 239 240 241 242 243 244 245 246 |
# File 'lib/mdk_runtime/actors.rb', line 237 def deliver() if ((self).start) (self).actor.onStart((self).dispatcher) else (self).actor.onStop() end nil end |
#toString ⇒ Object
226 227 228 229 230 231 232 233 234 235 |
# File 'lib/mdk_runtime/actors.rb', line 226 def toString() result = "stopping" if ((self).start) result = "starting" end return ((result) + (" ")) + (((self).actor).to_s) nil end |