Package org.eclipse.tycho.p2.impl.proxy
Class ProxyServiceFacadeImpl
- java.lang.Object
-
- org.eclipse.tycho.p2.impl.proxy.ProxyServiceFacadeImpl
-
- All Implemented Interfaces:
ProxyServiceFacade
public class ProxyServiceFacadeImpl extends java.lang.Object implements ProxyServiceFacade
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
MAVEN_SETTINGS_SOURCE
private static java.util.regex.Pattern
NON_PROXY_DELIMITERS
private org.eclipse.core.net.proxy.IProxyService
proxyService
-
Constructor Summary
Constructors Constructor Description ProxyServiceFacadeImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearPersistentProxySettings()
Discard persistent proxy settings.void
configureProxy(java.lang.String protocol, java.lang.String host, int port, java.lang.String user, java.lang.String password, java.lang.String nonProxyHosts)
Configure the OSGI proxy service for the protocol specified.private static java.lang.String
getProxyType(java.lang.String protocol)
private static void
recursiveClear(org.osgi.service.prefs.Preferences preferences)
private void
registerAuthenticator(java.lang.String user, java.lang.String password)
void
setProxyServer(org.eclipse.core.net.proxy.IProxyService proxyService)
void
unsetProxyServer(org.eclipse.core.net.proxy.IProxyService proxyService)
-
-
-
Field Detail
-
MAVEN_SETTINGS_SOURCE
private static final java.lang.String MAVEN_SETTINGS_SOURCE
- See Also:
- Constant Field Values
-
NON_PROXY_DELIMITERS
private static final java.util.regex.Pattern NON_PROXY_DELIMITERS
-
proxyService
private org.eclipse.core.net.proxy.IProxyService proxyService
-
-
Method Detail
-
configureProxy
public void configureProxy(java.lang.String protocol, java.lang.String host, int port, java.lang.String user, java.lang.String password, java.lang.String nonProxyHosts)
Description copied from interface:ProxyServiceFacade
Configure the OSGI proxy service for the protocol specified. Parameter values are assumed to be taken from {@see org.apache.maven.settings.Proxy}- Specified by:
configureProxy
in interfaceProxyServiceFacade
- Parameters:
protocol
- proxy protocolhost
- proxy hostport
- proxy portuser
- may benull
password
- may benull
nonProxyHosts
- pipe-separated list of non-proxied hosts, may benull
-
registerAuthenticator
private void registerAuthenticator(java.lang.String user, java.lang.String password)
-
getProxyType
private static java.lang.String getProxyType(java.lang.String protocol)
-
clearPersistentProxySettings
public void clearPersistentProxySettings()
Description copied from interface:ProxyServiceFacade
Discard persistent proxy settings. This is needed because org.eclipse.core.net.proxy.IProxyService always remembers its settings in eclipse/configuration/.settings/org.eclipse.core.net.prefs. Otherwise proxy settings would survive across OSGi framework restarts and thus influence subsequent builds.- Specified by:
clearPersistentProxySettings
in interfaceProxyServiceFacade
-
recursiveClear
private static void recursiveClear(org.osgi.service.prefs.Preferences preferences) throws org.osgi.service.prefs.BackingStoreException
- Throws:
org.osgi.service.prefs.BackingStoreException
-
setProxyServer
public void setProxyServer(org.eclipse.core.net.proxy.IProxyService proxyService)
-
unsetProxyServer
public void unsetProxyServer(org.eclipse.core.net.proxy.IProxyService proxyService)
-
-