* {@link #handleCast(ActorRef, Object, Object) handleCast} or {@link #handleInfo(Object) handleInfo} as appropriate.
*/
@Override
protected void handleMessage(Object m) throws InterruptedException, SuspendExecution {
if (m instanceof ServerRequest) {
ServerRequest r = (ServerRequest) m;
switch (r.getType()) {
case CALL:
try {
final V res = handleCall((ActorRef<V>) r.getFrom(), r.getId(), (CallMessage) r.getMessage());
if (res != null)
reply((ActorRef<V>) r.getFrom(), r.getId(), res == NULL_RETURN_VALUE ? null : res);
} catch (Exception e) {
replyError((ActorRef<V>) r.getFrom(), r.getId(), e);
}
break;
case CAST:
handleCast((ActorRef<V>) r.getFrom(), r.getId(), (CastMessage) r.getMessage());
break;
}
} else
handleInfo(m);
}