Package org.apache.solr.request
Class SolrRequestInfo
- java.lang.Object
- 
- org.apache.solr.request.SolrRequestInfo
 
- 
 public class SolrRequestInfo extends Object Information about the Solr request/response held in aThreadLocal.
- 
- 
Field SummaryFields Modifier and Type Field Description javax.servlet.http.HttpServletRequesthttpRequest
 - 
Constructor SummaryConstructors Constructor Description SolrRequestInfo(javax.servlet.http.HttpServletRequest httpReq, SolrQueryResponse rsp)SolrRequestInfo(javax.servlet.http.HttpServletRequest httpReq, SolrQueryResponse rsp, SolrDispatchFilter.Action action)SolrRequestInfo(SolrQueryRequest req, SolrQueryResponse rsp)SolrRequestInfo(SolrQueryRequest req, SolrQueryResponse rsp, SolrDispatchFilter.Action action)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCloseHook(Closeable hook)static voidclearRequestInfo()Removes the most recent SolrRequestInfo from the stack.SolrDispatchFilter.ActiongetAction()TimeZonegetClientTimeZone()The TimeZone specified by the request, or UTC if none was specified.static org.apache.solr.common.util.ExecutorUtil.InheritableThreadLocalProvidergetInheritableThreadLocalProvider()DategetNOW()SolrQueryRequestgetReq()static SolrRequestInfogetRequestInfo()ResponseBuildergetResponseBuilder()May return null if the request handler is not based on SearchHandlerSolrQueryResponsegetRsp()PrincipalgetUserPrincipal()static voidreset()This reset method is more of a protection mechanism as we expect it to be empty by now because all "set" calls need to be balanced with a "clear".voidsetAction(SolrDispatchFilter.Action action)static voidsetRequestInfo(SolrRequestInfo info)Adds the SolrRequestInfo onto a stack held in aThreadLocal.voidsetResponseBuilder(ResponseBuilder rb)voidsetUseServerToken(boolean use)booleanuseServerToken()Used when making remote requests to other Solr nodes from the thread associated with this request, true means the server token header should be used instead of the Principal associated with the request.
 
- 
- 
- 
Constructor Detail- 
SolrRequestInfopublic SolrRequestInfo(SolrQueryRequest req, SolrQueryResponse rsp) 
 - 
SolrRequestInfopublic SolrRequestInfo(SolrQueryRequest req, SolrQueryResponse rsp, SolrDispatchFilter.Action action) 
 - 
SolrRequestInfopublic SolrRequestInfo(javax.servlet.http.HttpServletRequest httpReq, SolrQueryResponse rsp)
 - 
SolrRequestInfopublic SolrRequestInfo(javax.servlet.http.HttpServletRequest httpReq, SolrQueryResponse rsp, SolrDispatchFilter.Action action)
 
- 
 - 
Method Detail- 
getRequestInfopublic static SolrRequestInfo getRequestInfo() 
 - 
setRequestInfopublic static void setRequestInfo(SolrRequestInfo info) Adds the SolrRequestInfo onto a stack held in aThreadLocal. Remember to callclearRequestInfo()!
 - 
clearRequestInfopublic static void clearRequestInfo() Removes the most recent SolrRequestInfo from the stack. Close hooks are called.
 - 
resetpublic static void reset() This reset method is more of a protection mechanism as we expect it to be empty by now because all "set" calls need to be balanced with a "clear".
 - 
getUserPrincipalpublic Principal getUserPrincipal() 
 - 
getNOWpublic Date getNOW() 
 - 
getClientTimeZonepublic TimeZone getClientTimeZone() The TimeZone specified by the request, or UTC if none was specified.
 - 
getReqpublic SolrQueryRequest getReq() 
 - 
getRsppublic SolrQueryResponse getRsp() 
 - 
getResponseBuilderpublic ResponseBuilder getResponseBuilder() May return null if the request handler is not based on SearchHandler
 - 
setResponseBuilderpublic void setResponseBuilder(ResponseBuilder rb) 
 - 
addCloseHookpublic void addCloseHook(Closeable hook) 
 - 
getActionpublic SolrDispatchFilter.Action getAction() 
 - 
setActionpublic void setAction(SolrDispatchFilter.Action action) 
 - 
useServerTokenpublic boolean useServerToken() Used when making remote requests to other Solr nodes from the thread associated with this request, true means the server token header should be used instead of the Principal associated with the request.
 - 
setUseServerTokenpublic void setUseServerToken(boolean use) 
 - 
getInheritableThreadLocalProviderpublic static org.apache.solr.common.util.ExecutorUtil.InheritableThreadLocalProvider getInheritableThreadLocalProvider() 
 
- 
 
-