Package b4j.util
Class HttpSessionParams
java.lang.Object
b4j.util.HttpSessionParams
- All Implemented Interfaces:
IConfigurable
public class HttpSessionParams extends java.lang.Object implements IConfigurable
Helps in configuring and retrieving HTTP session config information.
- Author:
- ralph
-
Constructor Summary
Constructors Constructor Description HttpSessionParams()
Constructor. -
Method Summary
Modifier and Type Method Description void
configure(org.apache.commons.configuration.Configuration config)
AuthorizationCallback
getAuthorizationCallback()
Returns the authorizationCallback.java.lang.String
getLogin()
Returns the login name as told by the callback handler.java.lang.String
getPassword()
Returns the password as told by the callback handler.java.net.Proxy
getProxy()
Returns the proxy object ornull
if no proxy is present.AuthorizationCallback
getProxyAuthorizationCallback()
Returns the proxyAuthorizationCallback.java.lang.String
getProxyHost()
Returns the proxy hostname ofnull
if no proxy was defined.java.lang.String
getProxyPassword()
Returns the proxy password ofnull
if no proxy was defined.int
getProxyPort()
Returns the proxy port of-1
if no proxy was defined.java.lang.String
getProxyUser()
Returns the proxy user ofnull
if no proxy was defined.boolean
hasAuthorization()
Returns true when the session authentication was defined.boolean
hasProxy()
Returns true when the proxy was defined.boolean
hasProxyAuthentication()
Returns true when the proxy authentication was defined.boolean
isBasicAuthentication()
Returns the basicAuthentication.void
setAuthorizationCallback(AuthorizationCallback authorizationCallback)
Sets the authorizationCallback.void
setBasicAuthentication(boolean basicAuthentication)
Sets the basicAuthentication.void
setProxyAuthorizationCallback(AuthorizationCallback proxyAuthorizationCallback)
Sets the proxyAuthorizationCallback.void
setProxyHost(java.lang.String proxyHost)
Sets the proxyHost.void
setProxyPort(int proxyPort)
Sets the proxyPort.
-
Constructor Details
-
HttpSessionParams
public HttpSessionParams()Constructor.
-
-
Method Details
-
configure
public void configure(org.apache.commons.configuration.Configuration config) throws org.apache.commons.configuration.ConfigurationException- Specified by:
configure
in interfaceIConfigurable
- Throws:
org.apache.commons.configuration.ConfigurationException
-
getAuthorizationCallback
Returns the authorizationCallback.- Returns:
- the authorizationCallback
-
setAuthorizationCallback
Sets the authorizationCallback.- Parameters:
authorizationCallback
- the authorizationCallback to set
-
hasAuthorization
public boolean hasAuthorization()Returns true when the session authentication was defined.- Returns:
true
when a session authentication was defined
-
getLogin
public java.lang.String getLogin()Returns the login name as told by the callback handler.- Returns:
- login name
-
getPassword
public java.lang.String getPassword()Returns the password as told by the callback handler.- Returns:
- the password
-
hasProxy
public boolean hasProxy()Returns true when the proxy was defined.- Returns:
true
when a proxy was defined
-
getProxyHost
public java.lang.String getProxyHost()Returns the proxy hostname ofnull
if no proxy was defined.- Returns:
- the proxy host
-
getProxyPort
public int getProxyPort()Returns the proxy port of-1
if no proxy was defined.- Returns:
- the proxy port
-
hasProxyAuthentication
public boolean hasProxyAuthentication()Returns true when the proxy authentication was defined.- Returns:
true
when a proxy authentication was defined
-
getProxyUser
public java.lang.String getProxyUser()Returns the proxy user ofnull
if no proxy was defined.- Returns:
- the proxy user
-
getProxyPassword
public java.lang.String getProxyPassword()Returns the proxy password ofnull
if no proxy was defined.- Returns:
- the proxy password
-
setProxyHost
public void setProxyHost(java.lang.String proxyHost)Sets the proxyHost.- Parameters:
proxyHost
- the proxyHost to set
-
setProxyPort
public void setProxyPort(int proxyPort)Sets the proxyPort.- Parameters:
proxyPort
- the proxyPort to set
-
getProxyAuthorizationCallback
Returns the proxyAuthorizationCallback.- Returns:
- the proxyAuthorizationCallback
-
setProxyAuthorizationCallback
Sets the proxyAuthorizationCallback.- Parameters:
proxyAuthorizationCallback
- the proxyAuthorizationCallback to set
-
isBasicAuthentication
public boolean isBasicAuthentication()Returns the basicAuthentication.- Returns:
- the basicAuthentication
-
setBasicAuthentication
public void setBasicAuthentication(boolean basicAuthentication)Sets the basicAuthentication.- Parameters:
basicAuthentication
- the basicAuthentication to set
-
getProxy
public java.net.Proxy getProxy()Returns the proxy object ornull
if no proxy is present.- Returns:
- the proxy object
-