01: package tableappclient.business;
02:
03: import tableappclient.spec.AccessData;
04: import tableapp.spec.Access;
05: import tableappclient.business.axis.*;
06:
07: /**
08: * <p>Title: </p>
09: * <p>Description: </p>
10: * <p>Copyright: Copyright (c) 2005</p>
11: * <p>Company: </p>
12: * @author not attributable
13: * @version 1.0
14: */
15:
16: public class AccessDataImpl implements AccessData {
17: private Access access;
18:
19: public AccessDataImpl(String hostName, String portNum) {
20: this .access = getAccess(hostName, portNum);
21: }
22:
23: private Access getAccess(String hostName, String portNum) {
24: try {
25: WelcomePresentationService service = new WelcomePresentationServiceLocator();
26: WelcomePresentation welcome;
27: welcome = service.gettableApp(new java.net.URL("http://"
28: + hostName + ":" + portNum + "/tableApp/tableApp"));
29: Access access = welcome.returnAccess();
30: return access;
31: } catch (Exception exception) {
32: exception.printStackTrace();
33: return null;
34: }
35: }
36:
37: public int getNoAccesses() {
38: return access.getNoAccesses();
39: }
40:
41: public String getAccessTime() {
42: return access.getDate();
43: }
44: }
|