org.eclipse.core.net.proxy
Interface IProxyData
-
public interface IProxyData
An
IProxyData
contains the information that is required to connect to
a particular proxy server.
-
Since:
- 1.0
-
Restriction:
- This interface is not intended to be implemented by clients.
Method Summary
|
void
|
disable
()
Set the values of this data to represent a disabling of its type. |
String
|
getHost
()
Return the host name for the proxy server or null
if a proxy server of this type is not available. |
String
|
getPassword
()
Return the password that should be used when authenticating
for the proxy. |
int
|
getPort
()
Return the port that should be used when connecting to the host or -1
if the default port for the proxy protocol should be used. |
String
|
getType
()
Return the type of this proxy. |
String
|
getUserId
()
Return the id of the user that should be used when authenticating
for the proxy. |
boolean
|
isRequiresAuthentication
()
Returns whether the proxy requires authentication. |
void
|
setHost
(
String host)
Set the host name for the proxy server of this type. |
void
|
setPassword
(
String password)
Set the password that should be used when authenticating
for the proxy. |
void
|
setPort
(int port)
Set the port that should be used when connecting to the host. |
void
|
setUserid
(
String userid)
Set the id of the user that should be used when authenticating
for the proxy. |
HTTP_PROXY_TYPE
static final
String HTTP_PROXY_TYPE
- Type constant (value "HTTP") which identifies an HTTP proxy.
-
See Also:
-
getType()
,
Constant Field Values
HTTPS_PROXY_TYPE
static final
String HTTPS_PROXY_TYPE
- Type constant (value "HTTPS") which identifies an HTTPS proxy.
-
See Also:
-
getType()
,
Constant Field Values
SOCKS_PROXY_TYPE
static final
String SOCKS_PROXY_TYPE
- Type constant (value "SOCKS") which identifies an SOCKS proxy.
-
See Also:
-
getType()
,
Constant Field Values
getType
String getType()
- Return the type of this proxy. Additional proxy types may be
added in the future so clients should accommodate this.
-
-
Returns:
- the type of this proxy
-
See Also:
-
HTTP_PROXY_TYPE
,
HTTPS_PROXY_TYPE
,
SOCKS_PROXY_TYPE
getHost
String getHost()
- Return the host name for the proxy server or
null
if a proxy server of this type is not available.
-
-
Returns:
- the host name for the proxy server or
null
setHost
void setHost(
String host)
- Set the host name for the proxy server of this type.
If no proxy server of this type is available, the host name should
be set to
null
.
Setting this value will not affect the data returned from
IProxyService.getProxyData()
.
Clients can change the global settings by changing the proxy data instances and then
by calling
IProxyService.setProxyData(IProxyData[])
with the adjusted data.
-
-
Parameters:
-
host
- the host name for the proxy server or null
getPort
int getPort()
- Return the port that should be used when connecting to the host or -1
if the default port for the proxy protocol should be used.
-
-
Returns:
- the port that should be used when connecting to the host
setPort
void setPort(int port)
- Set the port that should be used when connecting to the host. Setting the port
to a value of -1 will indicate that the default port number for
the proxy type should be used.
Setting this value will not affect the data returned from
IProxyService.getProxyData()
.
Clients can change the global settings by changing the proxy data instances and then
by calling
IProxyService.setProxyData(IProxyData[])
with the adjusted data.
-
-
Parameters:
-
port
- the port that should be used when connecting to the host
or -1 if the default port is to be used
getUserId
String getUserId()
- Return the id of the user that should be used when authenticating
for the proxy. A
null
is returned if there is no
authentication information.
-
-
Returns:
- the id of the user that should be used when authenticating
for the proxy or
null
setUserid
void setUserid(
String userid)
- Set the id of the user that should be used when authenticating
for the proxy. A
null
should be used if there is no
authentication information.
Setting this value will not affect the data returned from
IProxyService.getProxyData()
.
Clients can change the global settings by changing the proxy data instances and then
by calling
IProxyService.setProxyData(IProxyData[])
with the adjusted data.
-
-
Parameters:
-
userid
- the id of the user that should be used when authenticating
for the proxy or null
getPassword
String getPassword()
- Return the password that should be used when authenticating
for the proxy. A
null
is returned if there is no
password or the password is not known.
-
-
Returns:
- the password that should be used when authenticating
for the proxy or
null
setPassword
void setPassword(
String password)
- Set the password that should be used when authenticating
for the proxy. A
null
should be passed if there is no
password or the password is not known.
Setting this value will not affect the data returned from
IProxyService.getProxyData()
.
Clients can change the global settings by changing the proxy data instances and then
by calling
IProxyService.setProxyData(IProxyData[])
with the adjusted data.
-
-
Parameters:
-
password
- the password that should be used when authenticating
for the proxy or null
isRequiresAuthentication
boolean isRequiresAuthentication()
- Returns whether the proxy requires authentication. If the proxy
requires authentication but the user name and password fields of
this proxy data are null, the client can expect the connection
to fail unless they somehow obtain the authentication information.
-
-
Returns:
- whether the proxy requires authentication
disable
void disable()
- Set the values of this data to represent a disabling of its type.
Note that the proxy type will not be disabled unless the client
calls
IProxyService.setProxyData(IProxyData[])
with the
disabled data as a parameter. A proxy data can be enabled by setting
the host.
-
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.