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.
1866 1867 1868 1869 1870 1871 1872 1873 1874 |
# File 'lib/mdk_protocol.rb', line 1866 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.
1859 1860 1861 |
# File 'lib/mdk_protocol.rb', line 1859 def dispatcher @dispatcher end |
#origin ⇒ Object
Returns the value of attribute origin.
1859 1860 1861 |
# File 'lib/mdk_protocol.rb', line 1859 def origin @origin end |
#sock ⇒ Object
Returns the value of attribute sock.
1859 1860 1861 |
# File 'lib/mdk_protocol.rb', line 1859 def sock @sock end |
Instance Method Details
#__init_fields__ ⇒ Object
1931 1932 1933 1934 1935 1936 1937 1938 |
# File 'lib/mdk_protocol.rb', line 1931 def __init_fields__() self.origin = nil self.dispatcher = nil self.sock = nil nil end |
#_getClass ⇒ Object
1893 1894 1895 1896 1897 1898 |
# File 'lib/mdk_protocol.rb', line 1893 def _getClass() return "mdk_protocol.WSSend" nil end |
#_getField(name) ⇒ Object
1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 |
# File 'lib/mdk_protocol.rb', line 1900 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
1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 |
# File 'lib/mdk_protocol.rb', line 1916 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
1879 1880 1881 1882 1883 1884 |
# File 'lib/mdk_protocol.rb', line 1879 def send(event) @dispatcher.tell(@origin, event.encode(), @sock) nil end |
#toString ⇒ Object
1886 1887 1888 1889 1890 1891 |
# File 'lib/mdk_protocol.rb', line 1886 def toString() return ((self).sock).to_s nil end |