
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!
org.lsst.ccs.utilities.dispatch.SynchronousCommandFor,
org.lsst.ccs.utilities.dispatch.SynchronousCommandDispatcher,
org.lsst.ccs.utilities.dispatch.ParallelCommandDispatcher| Modifier and Type | Method and Description |
|---|---|
void |
invokeOn(T instance) |
void invokeOn(T instance)
Copyright © 2021 LSST. All rights reserved.