1 package org.sirius.client.win32.utils; 2 3 public class Win32UtilsProxy implements 4 org.sirius.client.win32.utils.Win32Utils { 5 private String _endpoint = null; 6 private org.sirius.client.win32.utils.Win32Utils win32Utils = null; 7 8 public Win32UtilsProxy() { 9 _initWin32UtilsProxy(); 10 } 11 12 public Win32UtilsProxy(String endpoint) { 13 _endpoint = endpoint; 14 _initWin32UtilsProxy(); 15 } 16 17 private void _initWin32UtilsProxy() { 18 try { 19 win32Utils = (new org.sirius.client.win32.utils.Win32UtilsServiceLocator()) 20 .getWin32UtilsPort(); 21 if (win32Utils != null) { 22 if (_endpoint != null) 23 ((javax.xml.rpc.Stub) win32Utils) 24 ._setProperty( 25 "javax.xml.rpc.service.endpoint.address", 26 _endpoint); 27 else 28 _endpoint = (String) ((javax.xml.rpc.Stub) win32Utils) 29 ._getProperty("javax.xml.rpc.service.endpoint.address"); 30 } 31 32 } catch (javax.xml.rpc.ServiceException serviceException) { 33 } 34 } 35 36 public String getEndpoint() { 37 return _endpoint; 38 } 39 40 public void setEndpoint(String endpoint) { 41 _endpoint = endpoint; 42 if (win32Utils != null) 43 ((javax.xml.rpc.Stub) win32Utils)._setProperty( 44 "javax.xml.rpc.service.endpoint.address", _endpoint); 45 46 } 47 48 public org.sirius.client.win32.utils.Win32Utils getWin32Utils() { 49 if (win32Utils == null) 50 _initWin32UtilsProxy(); 51 return win32Utils; 52 } 53 54 public long searchWindow(org.sirius.client.win32.types.Win32Locator arg0) 55 throws java.rmi.RemoteException { 56 if (win32Utils == null) 57 _initWin32UtilsProxy(); 58 return win32Utils.searchWindow(arg0); 59 } 60 61 public long searchSameThreadWindow(long arg0, 62 org.sirius.client.win32.types.Win32Locator arg1) 63 throws java.rmi.RemoteException { 64 if (win32Utils == null) 65 _initWin32UtilsProxy(); 66 return win32Utils.searchSameThreadWindow(arg0, arg1); 67 } 68 69 }