}
@Override
public void messageReceived(final FudgeContext fudgeContext, final FudgeMsgEnvelope msgEnvelope) {
final FudgeDeserializer deserializer = new FudgeDeserializer(fudgeContext);
final CacheMessage request = deserializer.fudgeMsgToObject(CacheMessage.class, msgEnvelope.getMessage());
CacheMessage response = request.accept(this);
if (response == null) {
if (request.getCorrelationId() != null) {
response = new CacheMessage();
}
}
if (response != null) {
response.setCorrelationId(request.getCorrelationId());
final FudgeSerializer sctx = new FudgeSerializer(fudgeContext);
final MutableFudgeMsg responseMsg = sctx.objectToFudgeMsg(response);
// We have only one response for each request type, so don't really need the headers
// FudgeSerializer.addClassHeader(responseMsg, response.getClass(), BinaryDataStoreResponse.class);
getConnection().getFudgeMessageSender().send(responseMsg);