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
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate intprivate booleanprivate booleanprivate booleanprivate intFields inherited from interface XmlRpcStreamConfig
UTF8_ENCODING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the password being used for basic HTTP authentication.Returns the user name being used for basic HTTP authentication.intReturn the connection timeout in millisecondsintReturn the reply timeout in millisecondsbooleanReturns, whether the response should contain a "faultCause" element in case of errors.booleanReturns, whether the request stream is being compressed.booleanReturns, whether compression is requested for the response stream.voidsetBasicPassword(String pPassword) Sets the password for basic authentication.voidsetBasicUserName(String pUser) Sets the user name for basic authentication.voidsetConnectionTimeout(int pTimeout) Set the connection timeout in milliseconds.voidsetEnabledForExceptions(boolean pEnabledForExceptions) Sets, whether the response should contain a "faultCause" element in case of errors.voidsetGzipCompressing(boolean pCompressing) Sets, whether gzip compression is being used for transmitting the request.voidsetGzipRequesting(boolean pRequesting) Sets, whether gzip compression is requested for the response.voidsetReplyTimeout(int pTimeout) Set the reply timeout in milliseconds.Methods inherited from class XmlRpcConfigImpl
getBasicEncoding, getEncoding, getTimeZone, isContentLengthOptional, isEnabledForExtensions, setBasicEncoding, setContentLengthOptional, setEnabledForExtensions, setEncoding, setTimeZoneMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface XmlRpcConfig
getTimeZone, isEnabledForExtensionsMethods inherited from interface XmlRpcHttpConfig
getBasicEncoding, isContentLengthOptionalMethods inherited from interface XmlRpcStreamConfig
getEncoding
-
Field Details
-
gzipCompressing
private boolean gzipCompressing -
gzipRequesting
private boolean gzipRequesting -
basicUserName
-
basicPassword
-
connectionTimeout
private int connectionTimeout -
replyTimeout
private int replyTimeout -
enabledForExceptions
private boolean enabledForExceptions
-
-
Constructor Details
-
XmlRpcHttpRequestConfigImpl
public XmlRpcHttpRequestConfigImpl()
-
-
Method Details
-
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:
-
isGzipCompressing
public boolean isGzipCompressing()Description copied from interface:XmlRpcStreamRequestConfigReturns, whether the request stream is being compressed. Note, that the response stream may still be uncompressed.- Specified by:
isGzipCompressingin interfaceXmlRpcStreamRequestConfig- Returns:
- Whether to use Gzip compression or not. Defaults to false.
- See Also:
-
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:
-
isGzipRequesting
public boolean isGzipRequesting()Description copied from interface:XmlRpcStreamRequestConfigReturns, 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:
isGzipRequestingin interfaceXmlRpcStreamRequestConfig- Returns:
- Whether to use Gzip compression or not. Defaults to false.
- See Also:
-
setBasicUserName
Sets the user name for basic authentication.- Parameters:
pUser- The user name.
-
getBasicUserName
Description copied from interface:XmlRpcHttpRequestConfigReturns the user name being used for basic HTTP authentication.- Specified by:
getBasicUserNamein interfaceXmlRpcHttpRequestConfig- Returns:
- User name or null, if no basic HTTP authentication is being used.
-
setBasicPassword
Sets the password for basic authentication.- Parameters:
pPassword- The password.
-
getBasicPassword
Description copied from interface:XmlRpcHttpRequestConfigReturns the password being used for basic HTTP authentication.- Specified by:
getBasicPasswordin 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:XmlRpcHttpRequestConfigReturn the connection timeout in milliseconds- Specified by:
getConnectionTimeoutin 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:XmlRpcHttpRequestConfigReturn the reply timeout in milliseconds- Specified by:
getReplyTimeoutin 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:XmlRpcStreamRequestConfigReturns, 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:
isEnabledForExceptionsin interfaceXmlRpcStreamRequestConfig
-