Commit f72c08ce authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2928] 'busadmin' oferce recurso de finalização do núcleo do barramento


git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/trunk@171339 ae0415b3-e90b-0410-900d-d0be9363c56b
parents 6d0b3e64 c51eb4dd
......@@ -159,26 +159,20 @@ function module.newSCS(params)
end
-- inicia o componente
function component.IComponent:startup()
component.IComponent.startup = params.startup or function(self)
for name, obj in pairs(facets) do
if obj.startup ~= nil then
obj:startup()
end
end
end
local shutdown = params.shutdown
function component.IComponent:shutdown()
component.IComponent.shutdown = params.shutdown or function(self)
for name, obj in pairs(facets) do
if obj.shutdown ~= nil then
obj:shutdown()
end
end
if shutdown ~= nil then shutdown() end
local errors = self.context:deactivateComponent()
for name, error in pairs(errors) do
errors[#errors+1] = tostring(error)
end
assert(errors == 0, concat(errors, "\n"))
self.context:deactivateComponent()
end
local init = params.init
if init ~= nil then init() end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment