Class: Quark::Quark::SpiApiTracing::RuntimeProxy

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(impl) ⇒ RuntimeProxy

Returns a new instance of RuntimeProxy.



1246
1247
1248
1249
1250
1251
1252
# File 'lib/quark/spi_api_tracing.rb', line 1246

def initialize(impl)
    
    super(impl.logger("api"), "Runtime")
    (self).impl = impl

    nil
end

Instance Attribute Details

#implObject

Returns the value of attribute impl.



1239
1240
1241
# File 'lib/quark/spi_api_tracing.rb', line 1239

def impl
  @impl
end

Instance Method Details

#__init_fields__Object



1412
1413
1414
1415
1416
1417
1418
# File 'lib/quark/spi_api_tracing.rb', line 1412

def __init_fields__()
    
    super
    self.impl = nil

    nil
end

#_getClassObject



1368
1369
1370
1371
1372
1373
# File 'lib/quark/spi_api_tracing.rb', line 1368

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

    nil
end

#_getField(name) ⇒ Object



1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
# File 'lib/quark/spi_api_tracing.rb', line 1375

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) == ("impl"))
        return (self).impl
    end
    return nil

    nil
end

#_setField(name, value) ⇒ Object



1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'lib/quark/spi_api_tracing.rb', line 1394

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) == ("impl"))
        (self).impl = ::DatawireQuarkCore.cast(value) { ::Quark.quark.Runtime }
    end

    nil
end

#callSafely(callee, defaultResult) ⇒ Object



1317
1318
1319
1320
1321
1322
1323
# File 'lib/quark/spi_api_tracing.rb', line 1317

def callSafely(callee, defaultResult)
    
    (self).log.debug(((((((self).id) + (".callSafely(")) + ((callee).to_s)) + (", ")) + ((defaultResult).to_s)) + (")"))
    return @impl.callSafely(callee, defaultResult)

    nil
end

#codecObject



1285
1286
1287
1288
1289
1290
1291
# File 'lib/quark/spi_api_tracing.rb', line 1285

def codec()
    
    (self).log.debug(((self).id) + (".codec()"))
    return @impl.codec()

    nil
end

#fail(message) ⇒ Object



1353
1354
1355
1356
1357
1358
1359
# File 'lib/quark/spi_api_tracing.rb', line 1353

def fail(message)
    
    (self).log.info(((((self).id) + (".fail(")) + (::Quark.quark.spi_api_tracing.quote(message))) + (")"))
    @impl.fail(message)

    nil
end

#logger(topic) ⇒ Object



1361
1362
1363
1364
1365
1366
# File 'lib/quark/spi_api_tracing.rb', line 1361

def logger(topic)
    
    return @impl.logger(topic)

    nil
end

#nowObject



1293
1294
1295
1296
1297
1298
1299
# File 'lib/quark/spi_api_tracing.rb', line 1293

def now()
    
    (self).log.debug(((self).id) + (".now()"))
    return @impl.now()

    nil
end

#open(url, handler) ⇒ Object



1257
1258
1259
1260
1261
1262
1263
1264
# File 'lib/quark/spi_api_tracing.rb', line 1257

def open(url, handler)
    
    wrapped_handler = ::Quark.quark.spi_api_tracing.WSHandlerProxy.new((self).log, handler)
    (self).log.debug(((((((self).id) + (".open(")) + (::Quark.quark.spi_api_tracing.quote(url))) + (", ")) + ((wrapped_handler).id)) + (")"))
    @impl.open(url, wrapped_handler)

    nil
end

#request(request, handler) ⇒ Object



1266
1267
1268
1269
1270
1271
1272
1273
1274
# File 'lib/quark/spi_api_tracing.rb', line 1266

def request(request, handler)
    
    wrapped_request = ::Quark.quark.spi_api_tracing.HTTPRequestProxy.new((self).log, request)
    wrapped_handler = ::Quark.quark.spi_api_tracing.HTTPHandlerProxy.new((self).log, wrapped_request, handler)
    (self).log.debug(((((((((((self).id) + (".request(")) + ((wrapped_request).id)) + (" ")) + (request.getMethod())) + (" ")) + (::Quark.quark.spi_api_tracing.quote(request.getUrl()))) + (", ")) + ((wrapped_handler).id)) + (")"))
    @impl.request(request, wrapped_handler)

    nil
end

#respond(request, response) ⇒ Object



1343
1344
1345
1346
1347
1348
1349
1350
1351
# File 'lib/quark/spi_api_tracing.rb', line 1343

def respond(request, response)
    
    wrapped_request = ::DatawireQuarkCore.cast(request) { ::Quark.quark.spi_api_tracing.HTTPRequestProxy }
    wrapped_response = ::DatawireQuarkCore.cast(response) { ::Quark.quark.spi_api_tracing.HTTPResponseProxy }
    (self).log.debug(((((((((((self).id) + (".respond(")) + ((wrapped_request).id)) + (", ")) + ((wrapped_response).id)) + (" ")) + ((wrapped_response.getCode()).to_s)) + (" ")) + (wrapped_response.getBody())) + (")"))
    @impl.respond((wrapped_request).request_impl, (wrapped_response).response_impl)

    nil
end

#schedule(handler, delayInSeconds) ⇒ Object



1276
1277
1278
1279
1280
1281
1282
1283
# File 'lib/quark/spi_api_tracing.rb', line 1276

def schedule(handler, delayInSeconds)
    
    wrapped_handler = ::Quark.quark.spi_api_tracing.TaskProxy.new((self).log, self, handler)
    (self).log.debug(((((((self).id) + (".schedule(")) + ((wrapped_handler).id)) + (", ")) + ((delayInSeconds).to_s)) + (")"))
    @impl.schedule(wrapped_handler, delayInSeconds)

    nil
end

#serveHTTP(url, servlet) ⇒ Object



1325
1326
1327
1328
1329
1330
1331
1332
# File 'lib/quark/spi_api_tracing.rb', line 1325

def serveHTTP(url, servlet)
    
    wrapped_servlet = ::Quark.quark.spi_api_tracing.HTTPServletProxy.new((self).log, self, servlet)
    (self).log.debug(((((((self).id) + (".serveHTTP(")) + (::Quark.quark.spi_api_tracing.quote(url))) + (", ")) + ((wrapped_servlet).id)) + (")"))
    @impl.serveHTTP(url, wrapped_servlet)

    nil
end

#serveWS(url, servlet) ⇒ Object



1334
1335
1336
1337
1338
1339
1340
1341
# File 'lib/quark/spi_api_tracing.rb', line 1334

def serveWS(url, servlet)
    
    wrapped_servlet = ::Quark.quark.spi_api_tracing.WSServletProxy.new((self).log, self, servlet)
    (self).log.debug(((((((self).id) + (".serveWS(")) + (::Quark.quark.spi_api_tracing.quote(url))) + (", ")) + ((wrapped_servlet).id)) + (")"))
    @impl.serveWS(url, wrapped_servlet)

    nil
end

#sleep(seconds) ⇒ Object



1301
1302
1303
1304
1305
1306
1307
# File 'lib/quark/spi_api_tracing.rb', line 1301

def sleep(seconds)
    
    (self).log.debug(((((self).id) + (".sleep(")) + ((seconds).to_s)) + (")"))
    @impl.sleep(seconds)

    nil
end

#uuidObject



1309
1310
1311
1312
1313
1314
1315
# File 'lib/quark/spi_api_tracing.rb', line 1309

def uuid()
    
    (self).log.debug(((self).id) + (".uuid()"))
    return @impl.uuid()

    nil
end