SerializationContext sc = SerializationContext.getSerializationContext();
try
{
// Deserialize the input stream into an "ActionMessage" object.
MessageDeserializer deserializer = sc.newMessageDeserializer();
// Set up the deserialization context
InputStream in = FlexContext.getHttpRequest().getInputStream();
deserializer.initialize(sc, in, debugTrace);
// record the length of the input stream for performance metrics
int reqLen = FlexContext.getHttpRequest().getContentLength();
context.setDeserializedBytes(reqLen);
// set up the incoming MPI info if it is enabled
if(context.isMPIenabled())
{
MessagePerformanceInfo mpi = new MessagePerformanceInfo();
mpi.recordMessageSizes = context.isRecordMessageSizes();
mpi.recordMessageTimes = context.isRecordMessageTimes();
if(context.isRecordMessageTimes())
mpi.receiveTime = System.currentTimeMillis();
if(context.isRecordMessageSizes())
mpi.messageSize =reqLen;
context.setMPII(mpi);
}
ActionMessage m = new ActionMessage();
context.setRequestMessage(m);
deserializer.readMessage(m, context);
success = true;
}
catch (EOFException eof)
{
context.setStatus(MessageIOConstants.STATUS_NOTAMF);