Infront Data Manager Connect Client (.NET)

Process Status Messages

- Requested instrument is not available
- You're not entitled to receive data for the requested instrument
- A basic data delivery service in the vwd backend fails

@Override
public void processUpdates(ArrayDeque<UpdateMessage> arg0)
{
Iterator<UpdateMessage> iter = arg0.iterator();
while (iter.hasNext())
{
boolean isRecap = false;
boolean isUpdate = false;
UpdateMessage update = iter.next();
countUpdates++;
switch (update.getMessageType())
{
// Update message
case Update:
isUpdate = true;
break;
// Partial recap message
case PartialRecap:
isRecap = true;
break;
// Recap message
case Recap:
isRecap = true;
break;
// Structured messages in binary google protocol buffers format
case Proto:
// Message ID
StringField sf = (StringField) update.getField(1);
if (sf.getValue().equals(MessageIdentifier.NewsMessage))
{
NewsMessage nm = ProtobufMessageHelper.deserializeNewsMessage(update);
if (nm != null)
{
System.out.println(nm);
}
}
break;
// Request status message
case RequestStatus:
// Process request status of current update
short status = ((RequestStatusMessage) update).getRequestStatus();
if (status == RequestStatus.NotDefined.getValue())
{
logger.info("RequestStatus for instrument: " + update.getInstrument() + ": NotDefined");
// do some action
}
else
{
if (status == RequestStatus.ServiceNotAvailable.getValue())
{
logger.info("RequestStatus for service: " + update.getInstrument() + ":ServiceNotAvaiable ");
} else
{
if (status == RequestStatus.NoPermission.getValue())
{
logger.info("RequestStatus for service: " + update.getInstrument() + ":NoPermission ");
}
}
}
break;
default:
break;
}
while (fields.hasNext())
{
// Process all fields in update
// Sequential access to fields
// ...
}
}

Copyright (C) 2021 Infront Financial Technology GmbH
Mainzer Landstrasse 178 – 190
60327 Frankfurt am Main
Infront Data Manager Connect V4.1