root / client / src / com / gonnatrak / client / TrackService.java @ 1

View | Annotate | Download

1
package com.gonnatrak.client;
2
3
import com.google.gwt.user.client.rpc.ServiceDefTarget;
4
import com.google.gwt.user.client.rpc.RemoteService;
5
import com.google.gwt.core.client.GWT;
6
7
/**
8
 * Created by Andrey Khalzov
9
 * 14.11.2008 0:58:10
10
 */
11
public interface TrackService extends RemoteService {
12
13
    TrackData getTrack(
14
            Long subjectId,
15
            Integer hfrom,
16
            Integer mfrom,
17
            Integer dfrom,
18
            Integer hto,
19
            Integer mto,
20
            Integer dto,
21
            Boolean valid
22
    );
23
24
    TrackData getTrack(
25
            String key,
26
            Long subjectId,
27
            Integer hfrom,
28
            Integer mfrom,
29
            Integer dfrom,
30
            Integer hto,
31
            Integer mto,
32
            Integer dto,
33
            Boolean valid
34
    );
35
36
    /**
37
     * Utility/Convenience class.
38
     * Use TrackService.App.getInstance() to access static instance of TrackServiceAsync
39
     */
40
    public static class App {
41
        private static TrackServiceAsync ourInstance = null;
42
43
        public static synchronized TrackServiceAsync getInstance() {
44
            if (ourInstance == null) {
45
                ourInstance = (TrackServiceAsync) GWT.create(TrackService.class);
46
                ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "Client/TrackService");
47
            }
48
            return ourInstance;
49
        }
50
    }
51
}