Class: Quark::MdkRuntime::Actors::InFlightMessage
- Inherits:
-
DatawireQuarkCore::QuarkObject
- Object
- DatawireQuarkCore::QuarkObject
- Quark::MdkRuntime::Actors::InFlightMessage
- Extended by:
- DatawireQuarkCore::Static
- Defined in:
- lib/mdk_runtime/actors.rb
Overview
A message that queued for delivery by a MessageDispatcher.
Constant Summary
Constants included from DatawireQuarkCore::Static
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#msg ⇒ Object
Returns the value of attribute msg.
-
#origin ⇒ Object
Returns the value of attribute origin.
Instance Method Summary collapse
- #__init_fields__ ⇒ Object
- #_getClass ⇒ Object
- #_getField(name) ⇒ Object
- #_setField(name, value) ⇒ Object
-
#deliver ⇒ Object
Deliver the message.
-
#initialize(origin, msg, destination) ⇒ InFlightMessage
constructor
A new instance of InFlightMessage.
- #toString ⇒ Object
Methods included from DatawireQuarkCore::Static
_lazy_statics, static, unlazy_statics
Methods inherited from DatawireQuarkCore::QuarkObject
Constructor Details
#initialize(origin, msg, destination) ⇒ InFlightMessage
Returns a new instance of InFlightMessage.
120 121 122 123 124 125 126 127 128 |
# File 'lib/mdk_runtime/actors.rb', line 120 def initialize(origin, msg, destination) self.__init_fields__ (self).origin = origin (self).msg = msg (self).destination = destination nil end |
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
113 114 115 |
# File 'lib/mdk_runtime/actors.rb', line 113 def destination @destination end |
#msg ⇒ Object
Returns the value of attribute msg.
113 114 115 |
# File 'lib/mdk_runtime/actors.rb', line 113 def msg @msg end |
#origin ⇒ Object
Returns the value of attribute origin.
113 114 115 |
# File 'lib/mdk_runtime/actors.rb', line 113 def origin @origin end |
Instance Method Details
#__init_fields__ ⇒ Object
188 189 190 191 192 193 194 195 |
# File 'lib/mdk_runtime/actors.rb', line 188 def __init_fields__() self.origin = nil self.msg = nil self.destination = nil nil end |
#_getClass ⇒ Object
150 151 152 153 154 155 |
# File 'lib/mdk_runtime/actors.rb', line 150 def _getClass() return "mdk_runtime.actors._InFlightMessage" nil end |
#_getField(name) ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/mdk_runtime/actors.rb', line 157 def _getField(name) if ((name) == ("origin")) return (self).origin end if ((name) == ("msg")) return (self).msg end if ((name) == ("destination")) return (self).destination end return nil nil end |
#_setField(name, value) ⇒ Object
173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/mdk_runtime/actors.rb', line 173 def _setField(name, value) if ((name) == ("origin")) (self).origin = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_runtime.actors.Actor } end if ((name) == ("msg")) (self).msg = value end if ((name) == ("destination")) (self).destination = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_runtime.actors.Actor } end nil end |
#deliver ⇒ Object
Deliver the message.
136 137 138 139 140 141 |
# File 'lib/mdk_runtime/actors.rb', line 136 def deliver() (self).destination.onMessage((self).origin, (self).msg) nil end |
#toString ⇒ Object
143 144 145 146 147 148 |
# File 'lib/mdk_runtime/actors.rb', line 143 def toString() return (((((("{") + ((@origin).to_s)) + ("->")) + ((@destination).to_s)) + (": ")) + ((@msg).to_s)) + ("}") nil end |