public class ProxyIoSession extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PROXY_SESSION |
| Constructor and Description |
|---|
ProxyIoSession(InetSocketAddress proxyAddress,
ProxyRequest request)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Charset |
getCharset()
Returns a charset instance of the in use charset name.
|
String |
getCharsetName()
Returns the used charset name or
DEFAULT_ENCODING if null. |
ProxyConnector |
getConnector()
Returns the proxy connector.
|
IoSessionEventQueue |
getEventQueue()
Returns the pending event queue.
|
ProxyLogicHandler |
getHandler()
Returns the
ProxyLogicHandler currently in use. |
List<HttpAuthenticationMethods> |
getPreferedOrder()
Returns the list of the prefered order for the authentication methods.
|
InetSocketAddress |
getProxyAddress()
Returns the IP address of the proxy server.
|
ProxyFilter |
getProxyFilter()
Returns the
ProxyFilter. |
ProxyRequest |
getRequest()
Returns the proxy request.
|
IoSession |
getSession()
Returns the current
IoSession. |
boolean |
isAuthenticationFailed()
Returns true if authentication failed.
|
boolean |
isReconnectionNeeded()
Returns true if the current authentication process is not finished
but the server has closed the connection.
|
void |
setAuthenticationFailed(boolean authenticationFailed)
Sets the authentication failed flag.
|
void |
setCharsetName(String charsetName)
Sets the charset to use.
|
void |
setConnector(ProxyConnector connector)
Sets the connector reference of this proxy session.
|
void |
setHandler(ProxyLogicHandler handler)
Sets the
ProxyLogicHandler to use. |
void |
setPreferedOrder(List<HttpAuthenticationMethods> preferedOrder)
Sets the ordered list of prefered authentication mechanisms.
|
void |
setProxyFilter(ProxyFilter proxyFilter)
Sets the
ProxyFilter. |
void |
setReconnectionNeeded(boolean reconnectionNeeded)
Sets the reconnection needed flag.
|
void |
setSession(IoSession session)
Sets the
IoSession in use. |
public static final String PROXY_SESSION
public ProxyIoSession(InetSocketAddress proxyAddress, ProxyRequest request)
proxyAddress - the IP address of the proxy serverrequest - the proxy requestpublic IoSessionEventQueue getEventQueue()
public List<HttpAuthenticationMethods> getPreferedOrder()
HttpSmartProxyHandler to determine
which authentication mechanism to use first between those accepted by the
proxy server. This list is only used when connecting to an http proxy.public void setPreferedOrder(List<HttpAuthenticationMethods> preferedOrder)
preferedOrder - the ordered listpublic ProxyLogicHandler getHandler()
ProxyLogicHandler currently in use.public void setHandler(ProxyLogicHandler handler)
ProxyLogicHandler to use.handler - the ProxyLogicHandler instancepublic ProxyFilter getProxyFilter()
ProxyFilter.public void setProxyFilter(ProxyFilter proxyFilter)
ProxyFilter.
Note : Please do not call this method from your code it could result
in an unexpected behaviour.proxyFilter - the filterpublic ProxyRequest getRequest()
public void setSession(IoSession session)
IoSession in use.
Note : Please do not call this method from your code it could result in an
unexpected behaviour.session - the current io sessionpublic ProxyConnector getConnector()
public void setConnector(ProxyConnector connector)
connector - the proxy connectorpublic InetSocketAddress getProxyAddress()
public boolean isReconnectionNeeded()
public void setReconnectionNeeded(boolean reconnectionNeeded)
reconnectionNeeded - the value to set the flag topublic Charset getCharset()
public String getCharsetName()
DEFAULT_ENCODING if null.public void setCharsetName(String charsetName)
charsetName - the charset namepublic boolean isAuthenticationFailed()
public void setAuthenticationFailed(boolean authenticationFailed)
authenticationFailed - the value to set the flag to