public interface CommandFor<T>
Example:
class ShowCommand implements CommandFor , Serializable{
String arg1 ;
int arg2 ;
// constructor and everything
public void invokeOn(Doer someInstance) {
someInstance.show(arg1, arg2)
}
}
Now suppose the receiving code reads the command from a Stream
Doer actor ; // initialized
// then later
ShowCommand command = (ShowCommand) objectStream.readObject() ;
command.invokeOn(actor); // and that's it!
SynchronousCommandFor,
SynchronousCommandDispatcher,
ParallelCommandDispatchervoid invokeOn(T instance)
Copyright © 2014 LSST. All Rights Reserved.