Class: Quark::MdkProtocol::WSSend
- Inherits:
-
DatawireQuarkCore::QuarkObject
- Object
- DatawireQuarkCore::QuarkObject
- Quark::MdkProtocol::WSSend
- Extended by:
- DatawireQuarkCore::Static
- Defined in:
- lib/mdk_protocol.rb
Overview
Send using a WebSocket actor.
Constant Summary
Constants included from DatawireQuarkCore::Static
DatawireQuarkCore::Static::Unassigned
Instance Attribute Summary collapse
-
#dispatcher ⇒ Object
Returns the value of attribute dispatcher.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#sock ⇒ Object
Returns the value of attribute sock.
Instance Method Summary collapse
- #__init_fields__ ⇒ Object
- #_getClass ⇒ Object
- #_getField(name) ⇒ Object
- #_setField(name, value) ⇒ Object
-
#initialize(origin, dispatcher, sock) ⇒ WSSend
constructor
A new instance of WSSend.
- #send(event) ⇒ Object
- #toString ⇒ Object
Methods included from DatawireQuarkCore::Static
_lazy_statics, static, unlazy_statics
Methods inherited from DatawireQuarkCore::QuarkObject
Constructor Details
#initialize(origin, dispatcher, sock) ⇒ WSSend
Returns a new instance of WSSend.
1858 1859 1860 1861 1862 1863 1864 1865 1866 |
# File 'lib/mdk_protocol.rb', line 1858 def initialize(origin, dispatcher, sock) self.__init_fields__ (self).origin = origin (self).dispatcher = dispatcher (self).sock = sock nil end |
Instance Attribute Details
#dispatcher ⇒ Object
Returns the value of attribute dispatcher.
1851 1852 1853 |
# File 'lib/mdk_protocol.rb', line 1851 def dispatcher @dispatcher end |
#origin ⇒ Object
Returns the value of attribute origin.
1851 1852 1853 |
# File 'lib/mdk_protocol.rb', line 1851 def origin @origin end |
#sock ⇒ Object
Returns the value of attribute sock.
1851 1852 1853 |
# File 'lib/mdk_protocol.rb', line 1851 def sock @sock end |
Instance Method Details
#__init_fields__ ⇒ Object
1923 1924 1925 1926 1927 1928 1929 1930 |
# File 'lib/mdk_protocol.rb', line 1923 def __init_fields__() self.origin = nil self.dispatcher = nil self.sock = nil nil end |
#_getClass ⇒ Object
1885 1886 1887 1888 1889 1890 |
# File 'lib/mdk_protocol.rb', line 1885 def _getClass() return "mdk_protocol.WSSend" nil end |
#_getField(name) ⇒ Object
1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 |
# File 'lib/mdk_protocol.rb', line 1892 def _getField(name) if ((name) == ("origin")) return (self).origin end if ((name) == ("dispatcher")) return (self).dispatcher end if ((name) == ("sock")) return (self).sock end return nil nil end |
#_setField(name, value) ⇒ Object
1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 |
# File 'lib/mdk_protocol.rb', line 1908 def _setField(name, value) if ((name) == ("origin")) (self).origin = ::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) == ("sock")) (self).sock = ::DatawireQuarkCore.cast(value) { ::Quark.mdk_runtime.actors.Actor } end nil end |
#send(event) ⇒ Object
1871 1872 1873 1874 1875 1876 |
# File 'lib/mdk_protocol.rb', line 1871 def send(event) @dispatcher.tell(@origin, event.encode(), @sock) nil end |
#toString ⇒ Object
1878 1879 1880 1881 1882 1883 |
# File 'lib/mdk_protocol.rb', line 1878 def toString() return ((self).sock).to_s nil end |