Árvore de páginas

Responsável por retornar o status do threadpool que recebeu a requisição

Sintaxe
getThreadPoolStatus()
Retorno
NomeTipoDescrição
nStatusnuméricoRetorna qual é o estado do thread pool 0 - STOPPED , 1 - STARTING, 2 - STARTED, 3 - STOPPING0STOPPED,1STARTING,2STARTED,3STOPPING
Observações
  • Para visualizar o exemplo, execute seu serviço rest com a URI: /documentation/getThreadPoolStatus
Exemplos
#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)
Abrangência

01/2020

  • Sem rótulos