Kevin Gallardo created TINKERPOP-1486:
-----------------------------------------

             Summary: Improve API of RemoteConnection
                 Key: TINKERPOP-1486
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1486
             Project: TinkerPop
          Issue Type: Bug
          Components: io, language-variant, process
    Affects Versions: 3.2.2
            Reporter: Kevin Gallardo


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




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to