|
Eclipse Platform Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IProxyService
Manages the proxy data and related information. The proxy service is registered as an OSGi service. Clients can obtain an instance of the service from their bundle context or from a service tracker.
This interface is not intended to be implemented by clients.
Method Summary | |
---|---|
void |
addProxyChangeListener(IProxyChangeListener listener)
Register a listener that will be notified when proxy related information changes. |
java.lang.String[] |
getNonProxiedHosts()
Return the list of hosts for which non proxy should be used. |
IProxyData[] |
getProxyData()
Return the list of know proxy types and their settings. |
IProxyData |
getProxyData(java.lang.String type)
Return the proxy data for the proxy of the given type or null if the proxy type is not known by this
service. |
IProxyData[] |
getProxyDataForHost(java.lang.String host)
Return the list of known proxy types and their settings for the given host. |
IProxyData |
getProxyDataForHost(java.lang.String host,
java.lang.String type)
Return the proxy data for the proxy of the given type or null if the proxy type is not known by this
service, the proxy data is empty for that type or the
host is in the non-proxied host list. |
boolean |
isProxiesEnabled()
Return whether proxy support should be enabled. |
void |
removeProxyChangeListener(IProxyChangeListener listener)
Remove a listener. |
void |
setNonProxiedHosts(java.lang.String[] hosts)
Set the list of hosts for which non proxy should be used. |
void |
setProxiesEnabled(boolean enabled)
Set whether proxy support should be enabled. |
void |
setProxyData(IProxyData[] proxies)
Set the information associated with known proxy types. |
Method Detail |
---|
void setProxiesEnabled(boolean enabled)
isProxiesEnabled()
before calling the getProxyData()
or getProxyData(String)
method.
However, the getProxyDataForHost(String)
and getProxyDataForHost(String, String)
method will check the enablement and only return data if the service is enabled.
enabled
- whether proxy support should be enabledboolean isProxiesEnabled()
IProxyData[] getProxyData()
null
.
IProxyData[] getProxyDataForHost(java.lang.String host)
host
- the host for which a connection is desired
IProxyData getProxyData(java.lang.String type)
null
if the proxy type is not known by this
service.
type
- the proxy type
null
IProxyData.HTTP_PROXY_TYPE
,
IProxyData.HTTPS_PROXY_TYPE
,
IProxyData.SOCKS_PROXY_TYPE
IProxyData getProxyDataForHost(java.lang.String host, java.lang.String type)
null
if the proxy type is not known by this
service, the proxy data is empty for that type or the
host is in the non-proxied host list.
host
- the host for which a connection is desiredtype
- the proxy type
null
IProxyData.HTTP_PROXY_TYPE
,
IProxyData.HTTPS_PROXY_TYPE
,
IProxyData.SOCKS_PROXY_TYPE
void setProxyData(IProxyData[] proxies) throws CoreException
proxies
- the proxy data whose information is to be set.
CoreException
- if the proxy could not be setjava.lang.String[] getNonProxiedHosts()
getProxyDataForHost(String)
or getProxyDataForHost(String, String)
.
getProxyDataForHost(String)
,
getProxyDataForHost(String, String)
void setNonProxiedHosts(java.lang.String[] hosts) throws CoreException
hosts
- the list of hosts for which non proxy should be used.
CoreException
- if the non-proxied host list could not be setvoid addProxyChangeListener(IProxyChangeListener listener)
listener
- a change listenervoid removeProxyChangeListener(IProxyChangeListener listener)
listener
- a change listener
|
Eclipse Platform Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.