Is there a way, using RequestFactory, to send an entity over the wire specified, not by its type but by the interface that it implements?
For example, the entity below:
public class Action{
....
Ref<Followable> target;
....
public Followable getTarget() {
return target.get();
}
}
Action can reference any entity which implements the interface Followable. I want to send instances of ActionProxy including FollowableProxy over the wire and I want my client to be able to downcast FollowableProxy to its actual class (which I happen to know as another property of Action). Is that even possible? If not, is there another recommended way of implemented this type of generic functionality (Action being able to reference different types of entities)?
(same question but asked differently, in
so)