Package org.apache.xmlrpc.common
Class XmlRpcHttpRequestConfigImpl
- java.lang.Object
-
- org.apache.xmlrpc.XmlRpcConfigImpl
-
- org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl
-
- All Implemented Interfaces:
XmlRpcHttpConfig
,XmlRpcHttpRequestConfig
,XmlRpcStreamConfig
,XmlRpcStreamRequestConfig
,XmlRpcConfig
,XmlRpcRequestConfig
- Direct Known Subclasses:
RequestData
,XmlRpcClientConfigImpl
public class XmlRpcHttpRequestConfigImpl extends XmlRpcConfigImpl implements XmlRpcHttpRequestConfig
Default implementation of a request configuration.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
basicPassword
private java.lang.String
basicUserName
private int
connectionTimeout
private boolean
enabledForExceptions
private boolean
gzipCompressing
private boolean
gzipRequesting
private int
replyTimeout
-
Fields inherited from interface org.apache.xmlrpc.common.XmlRpcStreamConfig
UTF8_ENCODING
-
-
Constructor Summary
Constructors Constructor Description XmlRpcHttpRequestConfigImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBasicPassword()
Returns the password being used for basic HTTP authentication.java.lang.String
getBasicUserName()
Returns the user name being used for basic HTTP authentication.int
getConnectionTimeout()
Return the connection timeout in millisecondsint
getReplyTimeout()
Return the reply timeout in millisecondsboolean
isEnabledForExceptions()
Returns, whether the response should contain a "faultCause" element in case of errors.boolean
isGzipCompressing()
Returns, whether the request stream is being compressed.boolean
isGzipRequesting()
Returns, whether compression is requested for the response stream.void
setBasicPassword(java.lang.String pPassword)
Sets the password for basic authentication.void
setBasicUserName(java.lang.String pUser)
Sets the user name for basic authentication.void
setConnectionTimeout(int pTimeout)
Set the connection timeout in milliseconds.void
setEnabledForExceptions(boolean pEnabledForExceptions)
Sets, whether the response should contain a "faultCause" element in case of errors.void
setGzipCompressing(boolean pCompressing)
Sets, whether gzip compression is being used for transmitting the request.void
setGzipRequesting(boolean pRequesting)
Sets, whether gzip compression is requested for the response.void
setReplyTimeout(int pTimeout)
Set the reply timeout in milliseconds.-
Methods inherited from class org.apache.xmlrpc.XmlRpcConfigImpl
getBasicEncoding, getEncoding, getTimeZone, isContentLengthOptional, isEnabledForExtensions, setBasicEncoding, setContentLengthOptional, setEnabledForExtensions, setEncoding, setTimeZone
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.xmlrpc.XmlRpcConfig
getTimeZone, isEnabledForExtensions
-
Methods inherited from interface org.apache.xmlrpc.common.XmlRpcHttpConfig
getBasicEncoding, isContentLengthOptional
-
Methods inherited from interface org.apache.xmlrpc.common.XmlRpcStreamConfig
getEncoding
-
-
-
-
Field Detail
-
gzipCompressing
private boolean gzipCompressing
-
gzipRequesting
private boolean gzipRequesting
-
basicUserName
private java.lang.String basicUserName
-
basicPassword
private java.lang.String basicPassword
-
connectionTimeout
private int connectionTimeout
-
replyTimeout
private int replyTimeout
-
enabledForExceptions
private boolean enabledForExceptions
-
-
Method Detail
-
setGzipCompressing
public void setGzipCompressing(boolean pCompressing)
Sets, whether gzip compression is being used for transmitting the request.- Parameters:
pCompressing
- True for enabling gzip compression, false otherwise.- See Also:
setGzipRequesting(boolean)
-
isGzipCompressing
public boolean isGzipCompressing()
Description copied from interface:XmlRpcStreamRequestConfig
Returns, whether the request stream is being compressed. Note, that the response stream may still be uncompressed.- Specified by:
isGzipCompressing
in interfaceXmlRpcStreamRequestConfig
- Returns:
- Whether to use Gzip compression or not. Defaults to false.
- See Also:
XmlRpcStreamRequestConfig.isGzipRequesting()
-
setGzipRequesting
public void setGzipRequesting(boolean pRequesting)
Sets, whether gzip compression is requested for the response.- Parameters:
pRequesting
- True for requesting gzip compression, false otherwise.- See Also:
setGzipCompressing(boolean)
-
isGzipRequesting
public boolean isGzipRequesting()
Description copied from interface:XmlRpcStreamRequestConfig
Returns, whether compression is requested for the response stream. Note, that the request is stull uncompressed, unlessXmlRpcStreamRequestConfig.isGzipCompressing()
is activated. Also note, that the server may still decide to send uncompressed data.- Specified by:
isGzipRequesting
in interfaceXmlRpcStreamRequestConfig
- Returns:
- Whether to use Gzip compression or not. Defaults to false.
- See Also:
XmlRpcStreamRequestConfig.isGzipCompressing()
-
setBasicUserName
public void setBasicUserName(java.lang.String pUser)
Sets the user name for basic authentication.- Parameters:
pUser
- The user name.
-
getBasicUserName
public java.lang.String getBasicUserName()
Description copied from interface:XmlRpcHttpRequestConfig
Returns the user name being used for basic HTTP authentication.- Specified by:
getBasicUserName
in interfaceXmlRpcHttpRequestConfig
- Returns:
- User name or null, if no basic HTTP authentication is being used.
-
setBasicPassword
public void setBasicPassword(java.lang.String pPassword)
Sets the password for basic authentication.- Parameters:
pPassword
- The password.
-
getBasicPassword
public java.lang.String getBasicPassword()
Description copied from interface:XmlRpcHttpRequestConfig
Returns the password being used for basic HTTP authentication.- Specified by:
getBasicPassword
in interfaceXmlRpcHttpRequestConfig
- Returns:
- Password or null, if no basic HTTP authentication is beind used.
-
setConnectionTimeout
public void setConnectionTimeout(int pTimeout)
Set the connection timeout in milliseconds.- Parameters:
pTimeout
- connection timeout, 0 to disable it
-
getConnectionTimeout
public int getConnectionTimeout()
Description copied from interface:XmlRpcHttpRequestConfig
Return the connection timeout in milliseconds- Specified by:
getConnectionTimeout
in interfaceXmlRpcHttpRequestConfig
- Returns:
- connection timeout in milliseconds or 0 if no set
-
setReplyTimeout
public void setReplyTimeout(int pTimeout)
Set the reply timeout in milliseconds.- Parameters:
pTimeout
- reply timeout, 0 to disable it
-
getReplyTimeout
public int getReplyTimeout()
Description copied from interface:XmlRpcHttpRequestConfig
Return the reply timeout in milliseconds- Specified by:
getReplyTimeout
in interfaceXmlRpcHttpRequestConfig
- Returns:
- reply timeout in milliseconds or 0 if no set
-
setEnabledForExceptions
public void setEnabledForExceptions(boolean pEnabledForExceptions)
Sets, whether the response should contain a "faultCause" element in case of errors. The "faultCause" is an exception, which the server has trapped and written into a byte stream as a serializable object.
-
isEnabledForExceptions
public boolean isEnabledForExceptions()
Description copied from interface:XmlRpcStreamRequestConfig
Returns, whether the response should contain a "faultCause" element in case of errors. The "faultCause" is an exception, which the server has trapped and written into a byte stream as a serializable object.- Specified by:
isEnabledForExceptions
in interfaceXmlRpcStreamRequestConfig
-
-