public class HttpJsonRequestFactory
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.atomic.AtomicInteger |
numOfCachedRequests |
protected int |
numOfCacheResets |
Constructor and Description |
---|
HttpJsonRequestFactory(int maxNumberOfCachedRequests) |
Modifier and Type | Method and Description |
---|---|
void |
addConfigureRequestEventHandler(EventHandler<WebRequestEventArgs> event) |
void |
addLogRequestEventHandler(EventHandler<RequestResultArgs> event) |
void |
cacheResponse(java.lang.String url,
RavenJToken data,
java.util.Map<java.lang.String,java.lang.String> headers) |
void |
close() |
CachedRequestOp |
configureCaching(java.lang.String url,
Action2<java.lang.String,java.lang.String> setHeader) |
HttpJsonRequest |
createHttpJsonRequest(CreateHttpJsonRequestParams createHttpJsonRequestParams) |
java.lang.AutoCloseable |
disableAllCaching() |
void |
expireItemsFromCache(java.lang.String db) |
java.lang.Long |
getAggressiveCacheDuration() |
int |
getCurrentCacheSize()
The number of currently held requests in the cache
|
boolean |
getDisableHttpCaching() |
org.apache.http.impl.client.CloseableHttpClient |
getHttpClient() |
int |
getNumOfCachedRequests() |
int |
getNumOfCacheResets() |
java.lang.Long |
getRequestTimeout() |
void |
incrementCachedRequests() |
void |
invokeLogRequest(IHoldProfilingInformation sender,
RequestResultArgs requestResult) |
boolean |
isDisableRequestCompression() |
boolean |
isEnableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers() |
void |
removeConfigureRequestEventHandler(EventHandler<WebRequestEventArgs> event) |
void |
removeLogRequestEventHandler(EventHandler<RequestResultArgs> event) |
void |
resetCache() |
void |
setAggressiveCacheDuration(java.lang.Long value) |
void |
setDisableHttpCaching(java.lang.Boolean value) |
void |
setDisableRequestCompression(boolean disableRequestCompression) |
void |
setEnableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers(boolean enableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers)
Advanced: Don't set this unless you know what you are doing!
Enable using basic authentication using http
By default, RavenDB only allows basic authentication over HTTPS, setting this property to true
will instruct RavenDB to make unsecured calls (usually only good for testing / internal networks).
|
void |
setNumOfCacheResets(int numOfCacheResets) |
void |
setRequestTimeout(java.lang.Long requestTimeout) |
protected void |
updateCacheTime(HttpJsonRequest httpJsonRequest) |
protected java.util.concurrent.atomic.AtomicInteger numOfCachedRequests
protected int numOfCacheResets
public HttpJsonRequestFactory(int maxNumberOfCachedRequests)
public void addConfigureRequestEventHandler(EventHandler<WebRequestEventArgs> event)
public void addLogRequestEventHandler(EventHandler<RequestResultArgs> event)
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
public void cacheResponse(java.lang.String url, RavenJToken data, java.util.Map<java.lang.String,java.lang.String> headers)
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
public CachedRequestOp configureCaching(java.lang.String url, Action2<java.lang.String,java.lang.String> setHeader)
public HttpJsonRequest createHttpJsonRequest(CreateHttpJsonRequestParams createHttpJsonRequestParams)
public java.lang.AutoCloseable disableAllCaching()
public void expireItemsFromCache(java.lang.String db)
public java.lang.Long getAggressiveCacheDuration()
public int getCurrentCacheSize()
public boolean getDisableHttpCaching()
public int getNumOfCachedRequests()
public int getNumOfCacheResets()
public void incrementCachedRequests()
public void invokeLogRequest(IHoldProfilingInformation sender, RequestResultArgs requestResult)
public boolean isDisableRequestCompression()
public boolean isEnableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers()
public void removeConfigureRequestEventHandler(EventHandler<WebRequestEventArgs> event)
public void removeLogRequestEventHandler(EventHandler<RequestResultArgs> event)
public void resetCache()
public void setAggressiveCacheDuration(java.lang.Long value)
public void setDisableHttpCaching(java.lang.Boolean value)
public void setDisableRequestCompression(boolean disableRequestCompression)
disableRequestCompression
- the disableRequestCompression to setpublic void setEnableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers(boolean enableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers)
enableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers
- the enableBasicAuthenticationOverUnsecuredHttpEvenThoughPasswordsWouldBeSentOverTheWireInClearTextToBeStolenByHackers to setpublic void setNumOfCacheResets(int numOfCacheResets)
numOfCacheResets
- the numOfCacheResets to setprotected void updateCacheTime(HttpJsonRequest httpJsonRequest)
public java.lang.Long getRequestTimeout()
public void setRequestTimeout(java.lang.Long requestTimeout)
Copyright © 2014. All Rights Reserved.