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 int
STORED_REQUESTS_COUNT
Default 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 void
clear()
Clear all request infosprotected void
deactivate()
int
getMaxNumberOfInfos()
Get the maximum number of provided infosint
getMayNumberOfInfos()
Get the maximum number of provided infosRequestInfo
getRequestInfo(String id)
Get the request info for the idIterable<RequestInfo>
getRequestInfos()
Get the request infosboolean
isEnabled()
Is recording of requests enabled?boolean
isEnabledFor(String path)
Is recording of requests for this path enabled?static void
recordRequest(org.apache.sling.api.SlingHttpServletRequest r)
protected void
update(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:RequestInfoProvider
Is recording of requests enabled?- Specified by:
isEnabled
in interfaceRequestInfoProvider
- Returns:
true
if enabled, false} otherwise
-
isEnabledFor
public boolean isEnabledFor(String path)
Description copied from interface:RequestInfoProvider
Is recording of requests for this path enabled?- Specified by:
isEnabledFor
in interfaceRequestInfoProvider
- Parameters:
path
- The path- Returns:
true
if enabled, false} otherwise
-
getMayNumberOfInfos
public int getMayNumberOfInfos()
Description copied from interface:RequestInfoProvider
Get the maximum number of provided infos- Specified by:
getMayNumberOfInfos
in interfaceRequestInfoProvider
- Returns:
- The maximum number,
0
if no infos are recorded
-
getMaxNumberOfInfos
public int getMaxNumberOfInfos()
Description copied from interface:RequestInfoProvider
Get the maximum number of provided infos- Specified by:
getMaxNumberOfInfos
in interfaceRequestInfoProvider
- Returns:
- The maximum number,
0
if no infos are recorded
-
clear
public void clear()
Description copied from interface:RequestInfoProvider
Clear all request infos- Specified by:
clear
in interfaceRequestInfoProvider
-
getRequestInfo
public RequestInfo getRequestInfo(String id)
Description copied from interface:RequestInfoProvider
Get the request info for the id- Specified by:
getRequestInfo
in interfaceRequestInfoProvider
- Parameters:
id
- The id- Returns:
- The request info or
null
-
getRequestInfos
public Iterable<RequestInfo> getRequestInfos()
Description copied from interface:RequestInfoProvider
Get the request infos- Specified by:
getRequestInfos
in interfaceRequestInfoProvider
- Returns:
- An iterator for the request infos
-
-