public class ResourceUsagePlugin extends Object implements PreResourcePlugin, PostResourcePlugin
Constructor and Description |
---|
ResourceUsagePlugin(AttributesStore attributesStore) |
Modifier and Type | Method and Description |
---|---|
boolean |
getMonitorLocalSources() |
ResourceRequest |
process(ResourceRequest input)
Processes the
ResourceRequest . |
ResourceResponse |
process(ResourceResponse input)
Processes a
ResourceResponse after the execution of a getResource operation. |
void |
setMonitorLocalSources(boolean monitorLocalSources) |
public ResourceUsagePlugin(AttributesStore attributesStore)
public ResourceRequest process(ResourceRequest input) throws PluginExecutionException, StopProcessingException
PreResourcePlugin
ResourceRequest
.process
in interface PreResourcePlugin
input
- - the ResourceRequest
to processResourceRequest
to pass to the next PreResourcePlugin
, or if this is the last PreResourcePlugin
to be calledPluginExecutionException
- when an error occurs during processingStopProcessingException
public ResourceResponse process(ResourceResponse input) throws PluginExecutionException, StopProcessingException
PostResourcePlugin
ResourceResponse
after the execution of a getResource operation.process
in interface PostResourcePlugin
input
- the ResourceResponse
to processResourceResponse
to pass to the next PostResourcePlugin
, or if this is the last PostResourcePlugin
to be calledPluginExecutionException
- thrown when an error occurs while processing the ResourceResponse
StopProcessingException
- thrown to halt processing when a critical issue occurs during
processing. This is intended to prevent other plugins from processing as well.public void setMonitorLocalSources(boolean monitorLocalSources)
public boolean getMonitorLocalSources()
This work is licensed under a Creative Commons Attribution 4.0 International License.