Hi,
is it possible to use non-static methods in the service and return
objects which
dont extend EntityProxy?
Regards,
Stefan
Am 18.01.2011 18:11, schrieb Thomas Broyer:
No you don't have to extend the servlet.
@Service(FooService.class)
interface FooContext extends RequestContext {
Request<String> echoString(String echo);
Request<Long> countFilesInDir(String dirName);
Request<Boolean> isThisStringOk(String str);
}
// because I didn't provide a ServiceLocator, methods have to be 'static'
class FooService {
public static String echoString(String echo) {
return echo;
}
public static Long countFilesInDir(String dirName) {
// do your thing here and return a long.
return 42L;
}
public static Boolean isThisStringOk(String str) {
// do your thing here and return a boolean
return true;
}
}
(I think you can use 'long' and 'boolean' as return types in the
FooService, but I haven't checked, so just in case ;-) )
--
You received this message because you are subscribed to the Google
Groups "Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google
Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.