KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tableappclient > business > AccessDataImpl


1 package tableappclient.business;
2
3 import tableappclient.spec.AccessData;
4 import tableapp.spec.Access;
5 import tableappclient.business.axis.*;
6
7 /**
8  * <p>Title: </p>
9  * <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
17     implements AccessData {
18   private Access access;
19
20   public AccessDataImpl(String JavaDoc hostName, String JavaDoc portNum) {
21     this.access = getAccess(hostName, portNum);
22   }
23
24   private Access getAccess(String JavaDoc hostName, String JavaDoc portNum) {
25     try {
26       WelcomePresentationService service = new
27           WelcomePresentationServiceLocator();
28       WelcomePresentation welcome;
29       welcome = service.gettableApp(new java.net.URL JavaDoc("http://"+hostName+":"+portNum+"/tableApp/tableApp"));
30       Access access = welcome.returnAccess();
31       return access;
32     }
33     catch (Exception JavaDoc exception) {
34       exception.printStackTrace();
35       return null;
36     }
37   }
38
39   public int getNoAccesses() {
40     return access.getNoAccesses();
41   }
42
43   public String JavaDoc getAccessTime() {
44     return access.getDate();
45   }
46 }
Popular Tags