py4j
Class AbstractCommand

java.lang.Object
  extended by py4j.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
CallCommand, ListCommand, StopGatewayCommand

public abstract class AbstractCommand
extends Object
implements Command


Field Summary
protected  Gateway gateway
           
 
Constructor Summary
AbstractCommand()
           
 
Method Summary
abstract  void execute(String command, BufferedReader reader, BufferedWriter writer)
           
protected  List<Argument> getArguments(BufferedReader reader)
           
protected  ReturnObject getReturnObject(String methodName, String targetObjectId, List<Argument> arguments)
           
 void init(Gateway gateway)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gateway

protected Gateway gateway
Constructor Detail

AbstractCommand

public AbstractCommand()
Method Detail

execute

public abstract void execute(String command,
                             BufferedReader reader,
                             BufferedWriter writer)
                      throws Py4JException,
                             IOException
Specified by:
execute in interface Command
Throws:
Py4JException
IOException

init

public void init(Gateway gateway)
Specified by:
init in interface Command

getArguments

protected List<Argument> getArguments(BufferedReader reader)
                               throws IOException
Throws:
IOException

getReturnObject

protected ReturnObject getReturnObject(String methodName,
                                       String targetObjectId,
                                       List<Argument> arguments)