Class NagiosEventNotifier

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.EventNotifier, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    public class NagiosEventNotifier
    extends org.apache.camel.support.EventNotifierSupport
    An EventNotifier which sends alters to Nagios.
    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.googlecode.jsendnsca.Level determineLevel​(org.apache.camel.spi.CamelEvent eventObject)  
      protected void doStart()  
      protected void doStop()  
      NagiosConfiguration getConfiguration()  
      String getHostName()  
      com.googlecode.jsendnsca.NagiosSettings getNagiosSettings()  
      String getServiceName()  
      boolean isEnabled​(org.apache.camel.spi.CamelEvent eventObject)  
      void notify​(org.apache.camel.spi.CamelEvent eventObject)  
      void setConfiguration​(NagiosConfiguration configuration)  
      void setHostName​(String hostName)  
      void setNagiosSettings​(com.googlecode.jsendnsca.NagiosSettings nagiosSettings)  
      void setServiceName​(String serviceName)  
      • Methods inherited from class org.apache.camel.support.EventNotifierSupport

        isDisabled, isIgnoreCamelContextEvents, isIgnoreExchangeCompletedEvent, isIgnoreExchangeCreatedEvent, isIgnoreExchangeEvents, isIgnoreExchangeFailedEvents, isIgnoreExchangeRedeliveryEvents, isIgnoreExchangeSendingEvents, isIgnoreExchangeSentEvents, isIgnoreRouteEvents, isIgnoreServiceEvents, isIgnoreStepEvents, setIgnoreCamelContextEvents, setIgnoreExchangeCompletedEvent, setIgnoreExchangeCreatedEvent, setIgnoreExchangeEvents, setIgnoreExchangeFailedEvents, setIgnoreExchangeRedeliveryEvents, setIgnoreExchangeSendingEvents, setIgnoreExchangeSentEvents, setIgnoreRouteEvents, setIgnoreServiceEvents, setIgnoreStepEvents
      • Methods inherited from class org.apache.camel.support.SimpleEventNotifierSupport

        isIgnoreCamelContextInitEvents, setIgnoreCamelContextInitEvents, setupIgnore
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • NagiosEventNotifier

        public NagiosEventNotifier()
      • NagiosEventNotifier

        public NagiosEventNotifier​(com.googlecode.jsendnsca.PassiveCheckSender sender)
    • Method Detail

      • notify

        public void notify​(org.apache.camel.spi.CamelEvent eventObject)
                    throws Exception
        Throws:
        Exception
      • isEnabled

        public boolean isEnabled​(org.apache.camel.spi.CamelEvent eventObject)
        Specified by:
        isEnabled in interface org.apache.camel.spi.EventNotifier
        Overrides:
        isEnabled in class org.apache.camel.support.EventNotifierSupport
      • determineLevel

        protected com.googlecode.jsendnsca.Level determineLevel​(org.apache.camel.spi.CamelEvent eventObject)
      • getNagiosSettings

        public com.googlecode.jsendnsca.NagiosSettings getNagiosSettings()
      • setNagiosSettings

        public void setNagiosSettings​(com.googlecode.jsendnsca.NagiosSettings nagiosSettings)
      • getServiceName

        public String getServiceName()
      • setServiceName

        public void setServiceName​(String serviceName)
      • getHostName

        public String getHostName()
      • setHostName

        public void setHostName​(String hostName)
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.apache.camel.support.EventNotifierSupport
        Throws:
        Exception
      • doStop

        protected void doStop()
                       throws Exception
        Overrides:
        doStop in class org.apache.camel.support.EventNotifierSupport
        Throws:
        Exception