감사합니다,
이
이클립스에 IProxyService 클래스를 사용하여 수행 할 수 있습니다. 아래의 코드 스 니펫은 무시할 수있는 경우 리플렉션을 사용합니다. 또한 프록시 추적기
private ServiceTracker getProxyTracker() throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
if (proxyTracker != null)
return proxyTracker;
String proxyServiceClassName = "org.eclipse.core.net.proxy.IProxyService";
String bundleClassName = "org.osgi.framework.Bundle";
Class bundleClass = Class.forName(bundleClassName);
Method getBundleContextMth = bundleClass.getMethod("getBundleContext", null);
getBundleContextMth.setAccessible(true);
BundleContext bundleCntx = (BundleContext) getBundleContextMth.invoke(bundle, null);
proxyTracker = new ServiceTracker(bundleCntx, proxyServiceClassName, null);
proxyTracker.open();
return proxyTracker;
}
2
) 프록시가
3
를 사용할 수 있는지 확인하기 위해 "isProxiesEnabled"방법을 사용)을에 따라)이 링크 (
http://www.vogella.de/blog/2009/12/08/eclipse-rcp-proxy-preference/)
1을 살펴 받기 Eclipse 버전은 "getProxyDataForHost"또는 "select"메소드를 사용하여 Eclipse 프록시 정보 (호스트, 사용자 ID, 비밀번호 등)에 액세스합니다.
동적이 아닌가 = 목표 호스트를 기반으로 자바 스크립트 함수에 의해 계산됩니까? IProxyService.select (URI) 메서드를 사용하고 거기에 대상 URL을 지정하려고 시도 했습니까? –