Class RequestInfoProviderImpl
- java.lang.Object
-
- org.apache.sling.engine.impl.debug.RequestInfoProviderImpl
-
- All Implemented Interfaces:
RequestInfoProvider
public class RequestInfoProviderImpl extends Object implements RequestInfoProvider
Track requests.
-
-
Field Summary
Fields Modifier and Type Field Description static intSTORED_REQUESTS_COUNTDefault for stored requests
-
Constructor Summary
Constructors Constructor Description RequestInfoProviderImpl(org.apache.sling.engine.impl.SlingMainServlet.Config config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear all request infosprotected voiddeactivate()intgetMaxNumberOfInfos()Get the maximum number of provided infosintgetMayNumberOfInfos()Get the maximum number of provided infosRequestInfogetRequestInfo(String id)Get the request info for the idIterable<RequestInfo>getRequestInfos()Get the request infosbooleanisEnabled()Is recording of requests enabled?booleanisEnabledFor(String path)Is recording of requests for this path enabled?static voidrecordRequest(org.apache.sling.api.SlingHttpServletRequest r)protected voidupdate(org.apache.sling.engine.impl.SlingMainServlet.Config config)
-
-
-
Field Detail
-
STORED_REQUESTS_COUNT
public static final int STORED_REQUESTS_COUNT
Default for stored requests- See Also:
- Constant Field Values
-
-
Method Detail
-
update
protected void update(org.apache.sling.engine.impl.SlingMainServlet.Config config)
-
deactivate
protected void deactivate()
-
recordRequest
public static void recordRequest(org.apache.sling.api.SlingHttpServletRequest r)
-
isEnabled
public boolean isEnabled()
Description copied from interface:RequestInfoProviderIs recording of requests enabled?- Specified by:
isEnabledin interfaceRequestInfoProvider- Returns:
trueif enabled, false} otherwise
-
isEnabledFor
public boolean isEnabledFor(String path)
Description copied from interface:RequestInfoProviderIs recording of requests for this path enabled?- Specified by:
isEnabledForin interfaceRequestInfoProvider- Parameters:
path- The path- Returns:
trueif enabled, false} otherwise
-
getMayNumberOfInfos
public int getMayNumberOfInfos()
Description copied from interface:RequestInfoProviderGet the maximum number of provided infos- Specified by:
getMayNumberOfInfosin interfaceRequestInfoProvider- Returns:
- The maximum number,
0if no infos are recorded
-
getMaxNumberOfInfos
public int getMaxNumberOfInfos()
Description copied from interface:RequestInfoProviderGet the maximum number of provided infos- Specified by:
getMaxNumberOfInfosin interfaceRequestInfoProvider- Returns:
- The maximum number,
0if no infos are recorded
-
clear
public void clear()
Description copied from interface:RequestInfoProviderClear all request infos- Specified by:
clearin interfaceRequestInfoProvider
-
getRequestInfo
public RequestInfo getRequestInfo(String id)
Description copied from interface:RequestInfoProviderGet the request info for the id- Specified by:
getRequestInfoin interfaceRequestInfoProvider- Parameters:
id- The id- Returns:
- The request info or
null
-
getRequestInfos
public Iterable<RequestInfo> getRequestInfos()
Description copied from interface:RequestInfoProviderGet the request infos- Specified by:
getRequestInfosin interfaceRequestInfoProvider- Returns:
- An iterator for the request infos
-
-