RequestProcessingException
{
boolean found = true;
// V2 Registration lookup first
RegistrationStatsInfo regStatsInfo = null;
try
{
DatabusRegistration r = findV2Registration(request, REGISTRATION_KEY_PREFIX);
writeJsonObjectToResponse(r, request);
}
catch (RequestProcessingException ex)
{
found = false;
}
// V3 Registration lookup if not found
if (!found)
{
DatabusV3Registration reg = findV3Registration(request, REGISTRATION_KEY_PREFIX); // if
// reg
// is
// null,
// the
// callee
// throws
// an
// exception.
DatabusSourcesConnection sourcesConn =
_client.getDatabusSourcesConnection(reg.getRegistrationId().getId());
regStatsInfo = new RegistrationStatsInfo(reg, sourcesConn);
writeJsonObjectToResponse(regStatsInfo, request);
}
}