Class DefaultPollContext

  • All Implemented Interfaces:
    PollContext

    public class DefaultPollContext
    extends java.lang.Object
    implements PollContext
    Represents a DefaultPollContext
    Version:
    $Id: $
    Author:
    Antonio Russo
    • Constructor Detail

      • DefaultPollContext

        public DefaultPollContext()
    • Method Detail

      • setEventManager

        public void setEventManager​(EventIpcManager eventManager)

        setEventManager

        Parameters:
        eventManager - a EventIpcManager object.
      • setLocalHostName

        public void setLocalHostName​(java.lang.String localHostName)

        setLocalHostName

        Parameters:
        localHostName - a String object.
      • getLocalHostName

        public java.lang.String getLocalHostName()

        getLocalHostName

        Returns:
        a String object.
      • getName

        public java.lang.String getName()

        getName

        Returns:
        a String object.
      • setName

        public void setName​(java.lang.String name)

        setName

        Parameters:
        name - a String object.
      • getServiceName

        public java.lang.String getServiceName()

        getServiceName

        Specified by:
        getServiceName in interface PollContext
        Returns:
        a String object.
      • setServiceName

        public void setServiceName​(java.lang.String serviceName)

        setServiceName

        Specified by:
        setServiceName in interface PollContext
        Parameters:
        serviceName - a String object.
      • sendEvent

        public void sendEvent​(Event event)

        sendEvent

        Specified by:
        sendEvent in interface PollContext
        Parameters:
        event - the event to send
      • createEvent

        public Event createEvent​(java.lang.String uei,
                                 int nodeId,
                                 java.lang.String addr,
                                 java.lang.String netMask,
                                 java.util.Date date,
                                 OnmsSnmpInterface snmpinterface)

        createEvent

        Specified by:
        createEvent in interface PollContext
        Parameters:
        uei - a String object.
        nodeId - a int.
        addr - a String object.
        netMask - a String object.
        date - a Date object.
        snmpinterface - a OnmsSnmpInterface object.
        Returns:
        the event
      • get

        public java.util.List<OnmsSnmpInterface> get​(int nodeId,
                                                     java.lang.String criteria)

        get

        Specified by:
        get in interface PollContext
        Parameters:
        nodeId - a int.
        criteria - a String object.
        Returns:
        The List of OnmsSnmpInterfaces to be polled
      • getPollableNodesByIp

        public java.util.List<OnmsIpInterface> getPollableNodesByIp​(java.lang.String ipaddr)
        Description copied from interface: PollContext

        getPollableNodesByIp

        Specified by:
        getPollableNodesByIp in interface PollContext
        Parameters:
        ipaddr - the ip address of the node.
        Returns:
        The List of OnmsIpInterfaces to be polled
      • getLocation

        public java.lang.String getLocation​(java.lang.Integer nodeId)
        Specified by:
        getLocation in interface PollContext
      • setLocationAwareSnmpClient

        public void setLocationAwareSnmpClient​(LocationAwareSnmpClient locationAwareSnmpClient)