Package org.opennms.netmgt.threshd
Class ThresholdingServiceImpl
- java.lang.Object
-
- org.opennms.netmgt.threshd.ThresholdingServiceImpl
-
- All Implemented Interfaces:
EventListener
,ThresholdingService
public class ThresholdingServiceImpl extends java.lang.Object implements ThresholdingService, EventListener
Thresholding Service.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>
UEI_LIST
-
Constructor Summary
Constructors Constructor Description ThresholdingServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(ThresholdingSessionImpl session)
ThresholdingSession
createSession(int nodeId, java.lang.String hostAddress, java.lang.String serviceName, RrdRepository repository, ServiceParameters serviceParams)
Creates a session to perform Thresholding against.EventIpcManager
getEventIpcManager()
java.lang.String
getName()
Return the id of the listenerThresholdingSetPersister
getThresholdingSetPersister()
ThresholdingVisitorImpl
getThresholdingVistor(ThresholdingSession session, java.lang.Long sequenceNumber)
void
handleNodeCategoryChanged(IEvent event)
void
initOsgi()
void
nodeGainedService(IEvent event)
void
onEvent(IEvent e)
Process a sent event.void
setDistributed(boolean distributed)
void
setEventIpcManager(EventIpcManager eventIpcManager)
void
setEventProxy(EventForwarder eventForwarder)
void
setKvStore(BlobStore keyValueStore)
void
setThresholdingSetPersister(ThresholdingSetPersister thresholdingSetPersister)
void
setThresholdStateMonitor(ThresholdStateMonitor thresholdStateMonitor)
-
-
-
Method Detail
-
initOsgi
public void initOsgi()
-
getName
public java.lang.String getName()
Description copied from interface:EventListener
Return the id of the listener- Specified by:
getName
in interfaceEventListener
- Returns:
- a
String
object.
-
onEvent
public void onEvent(IEvent e)
Description copied from interface:EventListener
Process a sent event.- Specified by:
onEvent
in interfaceEventListener
- Parameters:
e
- aIEvent
object.
-
nodeGainedService
public void nodeGainedService(IEvent event)
-
handleNodeCategoryChanged
public void handleNodeCategoryChanged(IEvent event)
-
createSession
public ThresholdingSession createSession(int nodeId, java.lang.String hostAddress, java.lang.String serviceName, RrdRepository repository, ServiceParameters serviceParams) throws ThresholdInitializationException
Description copied from interface:ThresholdingService
Creates a session to perform Thresholding against. The Session is keyed by the combination of nodeId, hostAddress and serviceName.- Specified by:
createSession
in interfaceThresholdingService
- Parameters:
nodeId
- The Node Id.hostAddress
- The Host IP Address.serviceName
- The Service name.repository
- Must not be null. Will be used to resolve Resource Filters and for genertaing Event labels.serviceParams
- Must not be null. Required by some existingCollectionResource
objects to evaluate whether to apply thresholds when accepting aCollectionSet
. If yourCollectionResource
does not require this, pass an emptyServiceParameters
object.- Returns:
- A
ThresholdingSession
- Throws:
ThresholdInitializationException
- if there is an error creating theThresholdingSession
because of invalid Thresholding Configuration.
-
getThresholdingVistor
public ThresholdingVisitorImpl getThresholdingVistor(ThresholdingSession session, java.lang.Long sequenceNumber) throws ThresholdInitializationException
- Throws:
ThresholdInitializationException
-
getEventIpcManager
public EventIpcManager getEventIpcManager()
-
setEventIpcManager
public void setEventIpcManager(EventIpcManager eventIpcManager)
-
setEventProxy
@Autowired public void setEventProxy(EventForwarder eventForwarder)
-
getThresholdingSetPersister
public ThresholdingSetPersister getThresholdingSetPersister()
- Specified by:
getThresholdingSetPersister
in interfaceThresholdingService
-
setThresholdingSetPersister
public void setThresholdingSetPersister(ThresholdingSetPersister thresholdingSetPersister)
-
close
public void close(ThresholdingSessionImpl session)
-
setKvStore
public void setKvStore(BlobStore keyValueStore)
-
setDistributed
public void setDistributed(boolean distributed)
-
setThresholdStateMonitor
public void setThresholdStateMonitor(ThresholdStateMonitor thresholdStateMonitor)
-
-