Description
Currently an implementor that wants to define a RemoteConnection implementation must return a RemoteTraversal object from the RemoteConnection#submit(Bytecode) method.
Thus it needs to implement a specific RemoteTraversal class. When implementing a RemoteTraversal we need to implement the methods next() and hasNext(). However these methods never seem to get called. Moreover, we need to implement the method nextTraverser() which is the one that is actually going to get called, but the method is not abstract and it is not natural to understand that this particular method needs to be implemented.
It seems like all the other methods of RemoteTraversal are never called as well since it is only used in RemoteStep, which only calls nextTraverser(). I wonder if we could stop using the RemoteTraversal and instead have the submit() method return a simple abstract class that has:
- abstract method nextTraverser() returns Traverser
- abstract method getSideEffects() returns SideEffects
- possibly extend it later with others