Package co.arago.hiro.client.connection
Class GraphConnectionHandler
- java.lang.Object
-
- co.arago.hiro.client.connection.AbstractAPIHandler
-
- co.arago.hiro.client.connection.AbstractVersionAPIHandler
-
- co.arago.hiro.client.connection.GraphConnectionHandler
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class GraphConnectionHandler extends AbstractVersionAPIHandler implements java.lang.AutoCloseable
Basic connection to the HIRO Graph without any authentication. Can be used as root connection for several TokenAPIHandlers, i.e. a FixedTokenApiHandler with a token for each user that shall all use the same connection. Contains CookieHandler, the versionMap and the httpConnection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraphConnectionHandler.Builderstatic classGraphConnectionHandler.Conf<T extends GraphConnectionHandler.Conf<T>>
-
Field Summary
-
Fields inherited from class co.arago.hiro.client.connection.AbstractAPIHandler
httpClientHandler, httpRequestTimeout, maxRetries, rootApiURI, title, userAgent, version, webSocketURI
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGraphConnectionHandler(GraphConnectionHandler.Conf<?> builder)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToHeaders(HttpHeaderMap headers)Override this to add authentication tokens.voidclose()Close the underlying httpClientHandler.static GraphConnectionHandler.Conf<?>newBuilder()-
Methods inherited from class co.arago.hiro.client.connection.AbstractVersionAPIHandler
getApiURIOf, getVersionMap, requestVersionMap
-
Methods inherited from class co.arago.hiro.client.connection.AbstractAPIHandler
addQueryFragmentAndNormalize, buildApiURI, buildEndpointURI, buildURI, buildWebSocketURI, checkResponse, delete, executeAsyncWithStreamBody, executeAsyncWithStringBody, executeBinary, executeWithStreamBody, executeWithStringBody, get, getBinary, getConf, getHttpLogger, getHttpRequestTimeout, getMaxRetries, getOrBuildClient, getRequestBuilder, getRootApiURI, getUserAgent, getWebSocketURI, patch, patchBinary, post, postBinary, put, putBinary, send, sendAsync
-
-
-
-
Constructor Detail
-
GraphConnectionHandler
protected GraphConnectionHandler(GraphConnectionHandler.Conf<?> builder)
Constructor- Parameters:
builder- The builder to use.
-
-
Method Detail
-
newBuilder
public static GraphConnectionHandler.Conf<?> newBuilder()
-
addToHeaders
public void addToHeaders(HttpHeaderMap headers)
Override this to add authentication tokens. This only returns default headers since tokens are not available here.- Specified by:
addToHeadersin classAbstractAPIHandler- Parameters:
headers- Map of headers with initial values.
-
close
public void close()
Close the underlying httpClientHandler.- Specified by:
closein interfacejava.lang.AutoCloseable
-
-