I have interface:
public interface CartService extends RemoteService{
T execute(Action action);
}
Use
public
GetCartResponse execute(GetCart action) {
//do stuff
}
as the signature for the execute method in CartService
, it should work.
I ahve tested that the follwing compiles; just substituted ActionResponse
with Integer
, and Action
with List
, for convenience.
CartService:
public interface CartService {
T execute(List action);
}
XX:
public class XX implements CartService {
public T execute(List action) {
throw new UnsupportedOperationException("Not supported yet.");
}
}