ObjectInputStream obj = (ObjectInputStream) block;
ObjectSerialiser ser = mSerialisers.getSerialiser(obj.getType());
if (ser == null)
{
LOG.debug("No serialiser for type: " + obj.getType());
throw new ActivityProcessingException(
new MissingSerialiserException(obj.getType()));
}
ser.deserialise(obj.getInput(), result);
}
else
{
result.write(block);
}
}
}
catch (EOFException e)
{
// end of binary stream
}
catch (IOException e)
{
throw new ActivityProcessingException(e);
}
catch (PipeClosedException e)
{
// consumer wants no more data
}
catch (PipeIOException e)
{
throw new ActivityProcessingException(e);
}
catch (PipeTerminatedException e)
{
throw new ActivityTerminatedException();
}