Class: Quark::Quark::SpiApiTracing::WSHandlerProxy

Inherits:
Object
  • Object
show all
Extended by:
DatawireQuarkCore::Static
Defined in:
lib/quark/spi_api_tracing.rb

Constant Summary

Constants included from DatawireQuarkCore::Static

DatawireQuarkCore::Static::Unassigned

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DatawireQuarkCore::Static

_lazy_statics, static, unlazy_statics

Constructor Details

#initialize(log, handler_impl) ⇒ WSHandlerProxy

Returns a new instance of WSHandlerProxy.



973
974
975
976
977
978
979
980
# File 'lib/quark/spi_api_tracing.rb', line 973

def initialize(log, handler_impl)
    
    super(log, "WSHandler")
    (self).handler_impl = handler_impl
    (self)._wrapped_socket = ::DatawireQuarkCore.cast(nil) { ::Quark.quark.spi_api_tracing.WebSocketProxy }

    nil
end

Instance Attribute Details

#_wrapped_socketObject

Returns the value of attribute _wrapped_socket.



966
967
968
# File 'lib/quark/spi_api_tracing.rb', line 966

def _wrapped_socket
  @_wrapped_socket
end

#handler_implObject

Returns the value of attribute handler_impl.



966
967
968
# File 'lib/quark/spi_api_tracing.rb', line 966

def handler_impl
  @handler_impl
end

Instance Method Details

#__init_fields__Object



1108
1109
1110
1111
1112
1113
1114
1115
# File 'lib/quark/spi_api_tracing.rb', line 1108

def __init_fields__()
    
    super
    self.handler_impl = nil
    self._wrapped_socket = nil

    nil
end

#_getClassObject



1058
1059
1060
1061
1062
1063
# File 'lib/quark/spi_api_tracing.rb', line 1058

def _getClass()
    
    return "quark.spi_api_tracing.WSHandlerProxy"

    nil
end

#_getField(name) ⇒ Object



1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
# File 'lib/quark/spi_api_tracing.rb', line 1065

def _getField(name)
    
    if ((name) == ("namer"))
        return ::Quark.quark.spi_api_tracing.Identifiable.namer
    end
    if ((name) == ("id"))
        return (self).id
    end
    if ((name) == ("log"))
        return (self).log
    end
    if ((name) == ("handler_impl"))
        return (self).handler_impl
    end
    if ((name) == ("_wrapped_socket"))
        return (self)._wrapped_socket
    end
    return nil

    nil
end

#_setField(name, value) ⇒ Object



1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
# File 'lib/quark/spi_api_tracing.rb', line 1087

def _setField(name, value)
    
    if ((name) == ("namer"))
        ::Quark.quark.spi_api_tracing.Identifiable.namer = ::DatawireQuarkCore.cast(value) { ::Quark.quark.spi_api_tracing.Identificator }
    end
    if ((name) == ("id"))
        (self).id = ::DatawireQuarkCore.cast(value) { ::String }
    end
    if ((name) == ("log"))
        (self).log = value
    end
    if ((name) == ("handler_impl"))
        (self).handler_impl = ::DatawireQuarkCore.cast(value) { ::Quark.quark.WSHandler }
    end
    if ((name) == ("_wrapped_socket"))
        (self)._wrapped_socket = ::DatawireQuarkCore.cast(value) { ::Quark.quark.spi_api_tracing.WebSocketProxy }
    end

    nil
end

#_wrap_socket(socket) ⇒ Object



985
986
987
988
989
990
991
992
993
# File 'lib/quark/spi_api_tracing.rb', line 985

def _wrap_socket(socket)
    
    if ((@_wrapped_socket) == (nil))
        @_wrapped_socket = ::Quark.quark.spi_api_tracing.WebSocketProxy.new((self).log, socket)
    end
    return @_wrapped_socket

    nil
end

#onWSBinary(socket, message) ⇒ Object



1022
1023
1024
1025
1026
1027
1028
1029
# File 'lib/quark/spi_api_tracing.rb', line 1022

def onWSBinary(socket, message)
    
    wrapped_socket = self._wrap_socket(socket)
    (self).log.debug(((((((self).id) + (".onWSBinary(")) + ((wrapped_socket).id)) + (", ")) + (::Quark.quark.concurrent.Context.runtime().codec().toHexdump(message, 0, message.capacity(), 4))) + (")"))
    @handler_impl.onWSBinary(wrapped_socket, message)

    nil
end

#onWSClosed(socket) ⇒ Object



1031
1032
1033
1034
1035
1036
1037
1038
# File 'lib/quark/spi_api_tracing.rb', line 1031

def onWSClosed(socket)
    
    wrapped_socket = self._wrap_socket(socket)
    (self).log.debug(((((self).id) + (".onWSClosed(")) + ((wrapped_socket).id)) + (")"))
    @handler_impl.onWSClosed(wrapped_socket)

    nil
end

#onWSConnected(socket) ⇒ Object



1004
1005
1006
1007
1008
1009
1010
1011
# File 'lib/quark/spi_api_tracing.rb', line 1004

def onWSConnected(socket)
    
    wrapped_socket = self._wrap_socket(socket)
    (self).log.debug(((((self).id) + (".onWSConnected(")) + ((wrapped_socket).id)) + (")"))
    @handler_impl.onWSConnected(wrapped_socket)

    nil
end

#onWSError(socket, error) ⇒ Object



1040
1041
1042
1043
1044
1045
1046
1047
# File 'lib/quark/spi_api_tracing.rb', line 1040

def onWSError(socket, error)
    
    wrapped_socket = self._wrap_socket(socket)
    (self).log.debug(((((((self).id) + (".onWSError(")) + ((wrapped_socket).id)) + (", ")) + (::Quark.quark.spi_api_tracing.quote_error(error))) + (")"))
    @handler_impl.onWSError(wrapped_socket, error)

    nil
end

#onWSFinal(socket) ⇒ Object



1049
1050
1051
1052
1053
1054
1055
1056
# File 'lib/quark/spi_api_tracing.rb', line 1049

def onWSFinal(socket)
    
    wrapped_socket = self._wrap_socket(socket)
    (self).log.debug(((((self).id) + (".onWSFinal(")) + ((wrapped_socket).id)) + (")"))
    @handler_impl.onWSFinal(wrapped_socket)

    nil
end

#onWSInit(socket) ⇒ Object



995
996
997
998
999
1000
1001
1002
# File 'lib/quark/spi_api_tracing.rb', line 995

def onWSInit(socket)
    
    wrapped_socket = self._wrap_socket(socket)
    (self).log.debug(((((self).id) + (".onWSInit(")) + ((wrapped_socket).id)) + (")"))
    @handler_impl.onWSInit(wrapped_socket)

    nil
end

#onWSMessage(socket, message) ⇒ Object



1013
1014
1015
1016
1017
1018
1019
1020
# File 'lib/quark/spi_api_tracing.rb', line 1013

def onWSMessage(socket, message)
    
    wrapped_socket = self._wrap_socket(socket)
    (self).log.debug(((((((self).id) + (".onWSMessage(")) + ((wrapped_socket).id)) + (", ")) + (::Quark.quark.spi_api_tracing.quote(message))) + (")"))
    @handler_impl.onWSMessage(wrapped_socket, message)

    nil
end