Responsável por retornar o status do threadpool que recebeu a requisição
getThreadPoolStatus()
Nome | Tipo | Descrição |
---|
nStatus | numérico | Retorna qual é o estado do thread pool 0 - STOPPED , 1 - STARTING, 2 - STARTED, 3 - STOPPING0−STOPPED,1−STARTING,2−STARTED,3−STOPPING |
- Para visualizar o exemplo, execute seu serviço rest com a URI: /documentation/getThreadPoolStatus
#include "tlpp-core.th"
#include "tlpp-rest.th"
@Get('/documentation/getThreadPoolStatus')
function u_fGetThreadPoolStatus()
local aStatus := {"STOPPED","STARTING","STARTED","STOPPING"}
local cResponse := ""
local nRet := oRest:getThreadPoolStatus()
if (valtype(nRet) == 'N')
cResponse := '{"getThreadPoolStatus":"O status do threadpool ' + oRest:getThreadPoolName() + " eh: " + cValToChar(nRet) + "(" + aStatus[nRet] + ")" + '"}'
else
cResponse := '{"getThreadPoolStatus": "metodo getThreadPoolStatus nao foi executado"}'
endif
return oRest:setResponse(cResponse)
01/2020