Top Description Inners Fields Constructors Methods
org.apache.http.config

public Class ConnectionConfig

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Annotations
@Contract
threading:IMMUTABLE
Imports
java.nio.charset.Charset, .CodingErrorAction, org.apache.http.Consts, org.apache.http.annotation.ThreadingBehavior, .Contract, org.apache.http.util.Args

HTTP connection configuration.
Since
4.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final int
private final Charset
public static final ConnectionConfig
private final int
private final CodingErrorAction
private final MessageConstraints
private final CodingErrorAction

Constructor Summary

AccessConstructor and Description
pack-priv
ConnectionConfig(final int bufferSize, final int fragmentSizeHint, final Charset charset, final CodingErrorAction malformedInputAction, final CodingErrorAction unmappableInputAction, final MessageConstraints messageConstraints)

Method Summary

Modifier and TypeMethod and Description
protected ConnectionConfig
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public static ConnectionConfig.Builder
copy(final ConnectionConfig config)

public static ConnectionConfig.Builder
public int
public Charset
public int
public CodingErrorAction
public MessageConstraints
public CodingErrorAction
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bufferSizeback to summary
private final int bufferSize
charsetback to summary
private final Charset charset
DEFAULTback to summary
public static final ConnectionConfig DEFAULT
fragmentSizeHintback to summary
private final int fragmentSizeHint
malformedInputActionback to summary
private final CodingErrorAction malformedInputAction
messageConstraintsback to summary
private final MessageConstraints messageConstraints
unmappableInputActionback to summary
private final CodingErrorAction unmappableInputAction

Constructor Detail

ConnectionConfigback to summary
pack-priv ConnectionConfig(final int bufferSize, final int fragmentSizeHint, final Charset charset, final CodingErrorAction malformedInputAction, final CodingErrorAction unmappableInputAction, final MessageConstraints messageConstraints)

Method Detail

cloneback to summary
protected ConnectionConfig clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:ConnectionConfig

a clone of this instance.

Annotations
@Override
Exceptions
CloneNotSupportedException:
if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
copyback to summary
public static ConnectionConfig.Builder copy(final ConnectionConfig config)
customback to summary
public static ConnectionConfig.Builder custom()
getBufferSizeback to summary
public int getBufferSize()
getCharsetback to summary
public Charset getCharset()
getFragmentSizeHintback to summary
public int getFragmentSizeHint()
getMalformedInputActionback to summary
public CodingErrorAction getMalformedInputAction()
getMessageConstraintsback to summary
public MessageConstraints getMessageConstraints()
getUnmappableInputActionback to summary
public CodingErrorAction getUnmappableInputAction()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.apache.http.config back to summary

public Class ConnectionConfig.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private Charset
private int
private CodingErrorAction
private MessageConstraints
private CodingErrorAction

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ConnectionConfig
public ConnectionConfig.Builder
setBufferSize(final int bufferSize)

public ConnectionConfig.Builder
setCharset(final Charset charset)

public ConnectionConfig.Builder
setFragmentSizeHint(final int fragmentSizeHint)

public ConnectionConfig.Builder
setMalformedInputAction(final CodingErrorAction malformedInputAction)

public ConnectionConfig.Builder
setMessageConstraints(final MessageConstraints messageConstraints)

public ConnectionConfig.Builder
setUnmappableInputAction(final CodingErrorAction unmappableInputAction)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferSizeback to summary
private int bufferSize
charsetback to summary
private Charset charset
fragmentSizeHintback to summary
private int fragmentSizeHint
malformedInputActionback to summary
private CodingErrorAction malformedInputAction
messageConstraintsback to summary
private MessageConstraints messageConstraints
unmappableInputActionback to summary
private CodingErrorAction unmappableInputAction

Constructor Detail

Builderback to summary
pack-priv Builder()

Method Detail

buildback to summary
public ConnectionConfig build()
setBufferSizeback to summary
public ConnectionConfig.Builder setBufferSize(final int bufferSize)
setCharsetback to summary
public ConnectionConfig.Builder setCharset(final Charset charset)
setFragmentSizeHintback to summary
public ConnectionConfig.Builder setFragmentSizeHint(final int fragmentSizeHint)
setMalformedInputActionback to summary
public ConnectionConfig.Builder setMalformedInputAction(final CodingErrorAction malformedInputAction)
setMessageConstraintsback to summary
public ConnectionConfig.Builder setMessageConstraints(final MessageConstraints messageConstraints)
setUnmappableInputActionback to summary
public ConnectionConfig.Builder setUnmappableInputAction(final CodingErrorAction unmappableInputAction)