DatabusRequest request) throws RequestProcessingException
{
Map<RegistrationId, DatabusV3Registration> regIdMap = _client.getRegistrationIdMap();
if (null == regIdMap)
{
throw new InvalidRequestParamValueException(request.getName(),
REGISTRATION_KEY_PREFIX,
"No registrations available !! ");
}
/**
* Important Note: There is an important implementation difference on which
* registrations are stored in the global registration data-structure maintained by
* the client (DatabusHttp[V3]ClientImpls) between V2 and V3.
*
* 1. In the case of V2, only top-level registrations are stored in the global
* data-structure (DatabusHttpClientImpl.regList 2. In the case of V3, all
* registrations are stored in the global data-structure.
*
* In the case of V3, this is needed so that all registrations can act on the relay
* external view change. This can be refactored in the future by moving the
* relay-external view change to registration impl ( reduce the complexity in
* ClientImpl ). The V2 implementation did not have this logic and was following a
* more intuitive structure of preserving the hierarchy.
*/
for (DatabusV3Registration r : regIdMap.values())
{
if (regId.equals(r.getRegistrationId()))
{
return r;
}
}
throw new InvalidRequestParamValueException(request.getName(),
REGISTRATION_KEY_PREFIX,
"Registration with id " + regId
+ " not present !!");
}