jtulach@78: package api.request.response; jtulach@78: jtulach@78: import java.util.List; jtulach@78: jtulach@78: public interface Compute { jtulach@78: public void computeData(Request request, Response response); jtulach@78: jtulach@78: /** Right now useless, but may be handy in future */ jtulach@78: public final class Request { jtulach@78: /** allow access just from friend code */ jtulach@78: Request() { jtulach@78: } jtulach@78: } jtulach@78: jtulach@78: /** Allows clients to provide the computed strings */ jtulach@78: public final class Response { jtulach@78: private final List result; jtulach@78: /** Allow access only to friend code */ jtulach@78: Response(List result) { jtulach@78: this.result = result; jtulach@78: } jtulach@78: jtulach@78: public void add(String s) { jtulach@210: result.add(s); jtulach@78: } jtulach@78: jtulach@78: public void addAll(List all) { jtulach@210: result.addAll(all); jtulach@78: } jtulach@78: } jtulach@78: }