Class HttpClient
- All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, Cloneable, Iterable<Socket>, Collection<Socket>, Deque<Socket>, List<Socket>, Queue<Socket>, SequencedCollection<Socket>, SocketPoolMXBean
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) static class(package private) static class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprivate static final org.slf4j.Loggerprotected String[]Fields inherited from class SocketPool
connectTimeout, host, port, proxy, readTimeout, sslContext, thinLto, tosFields inherited from class Pool
closed, createdCount, fifo, initialCount, keepEmpty, maxCount, timeout, timeouts, waitingThreadsFields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionHttpClient(ConnectionString conn) HttpClient(ConnectionString conn, String... permanentHeaders) -
Method Summary
Modifier and TypeMethodDescriptioncreateRequest(int method, String uri, String... headers) openEvents(String uri, String... headers) openEvents(Request request, int timeout) reopenEvents(Request request, String lastId, int timeout) protected voidMethods inherited from class SocketPool
createObject, destroyObject, getBusyCount, getConnectTimeout, getFifo, getIdleCount, getMaxCount, getProxy, getReadTimeout, getSslContext, getTimeout, getTimeouts, getWaitingThreads, name, setConnectTimeout, setFifo, setMaxCount, setProxy, setReadTimeout, setSslContext, setTimeoutMethods inherited from class Pool
borrowObject, close, initialize, invalidateAll, invalidateObject, isClosed, returnObjectMethods inherited from class LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, set, size, spliterator, toArray, toArrayMethods inherited from class AbstractSequentialList
iteratorMethods inherited from class AbstractList
equals, hashCode, listIterator, removeRange, subListMethods inherited from class AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subListMethods inherited from interface SocketPoolMXBean
invalidateAll, isClosed
-
Field Details
-
log
private static final org.slf4j.Logger log -
permanentHeaders
-
bufferSize
protected int bufferSize
-
-
Constructor Details
-
HttpClient
-
HttpClient
-
-
Method Details
-
setProperties
- Overrides:
setPropertiesin classSocketPool
-
invoke
public Response invoke(Request request) throws InterruptedException, PoolException, IOException, HttpException -
invoke
public Response invoke(Request request, int timeout) throws InterruptedException, PoolException, IOException, HttpException -
get
public Response get(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
openEvents
public EventSourceResponse openEvents(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
delete
public Response delete(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
post
public Response post(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
post
public Response post(String uri, byte[] body, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
put
public Response put(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
put
public Response put(String uri, byte[] body, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
patch
public Response patch(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
patch
public Response patch(String uri, byte[] body, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
head
public Response head(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
options
public Response options(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
trace
public Response trace(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
connect
public Response connect(String uri, String... headers) throws InterruptedException, PoolException, IOException, HttpException -
openEvents
public EventSourceResponse openEvents(Request request, int timeout) throws InterruptedException, PoolException, IOException, HttpException -
reopenEvents
public EventSourceResponse reopenEvents(Request request, String lastId, int timeout) throws InterruptedException, PoolException, IOException, HttpException -
createRequest
-