EventCounterHandler instead.
@Deprecated public class CounterManager extends Object
ICounterFactory. Create ICounter for each registered ICounterFactory and send corresponding events on document read and write.
You can implement your own ICounterFactory and register them with register(ICounterFactory) Or implement ICounter and register it with SimpleCounterFactory like this: CounterManager.getInstance().register(new SimpleCounterFactory(new SystemOutCounter()); SystemOutCounter is just an example of a ICounter implementation.
This functionality can be used to create metrics in a SaaS context.
| Modifier and Type | Method and Description |
|---|---|
List<ICounter> |
getCounters(Class> cls)
Deprecated.
Returns a list of registered counters for specific class.
|
static CounterManager |
getInstance()
Deprecated.
Returns the singleton instance of the factory.
|
void |
register(ICounterFactory factory)
Deprecated.
Register new ICounterFactory.
|
boolean |
unregister(ICounterFactory factory)
Deprecated.
Unregister specified ICounterFactory.
|
public static CounterManager getInstance()
CounterManager instance.
public List<ICounter> getCounters(Class> cls)
cls - the class for which registered counters are fetched.
ICounter.
public void register(ICounterFactory factory)
ICounterFactory. Does nothing if same factory was already registered.
factory - ICounterFactory to be registered
public boolean unregister(ICounterFactory factory)
ICounterFactory. Does nothing if this factory wasn't registered first.
factory - ICounterFactory to be unregistered
true if specified factory was registered first
Copyright © 1998–2019 iText Group NV. All rights reserved.