Class ServiceMonitor

java.lang.Object
org.jgrapes.core.internal.ComponentVertex
org.jgrapes.core.Component
org.jdrupes.vmoperator.manager.AbstractMonitor<io.kubernetes.client.openapi.models.V1Service,io.kubernetes.client.openapi.models.V1ServiceList,VmChannel>
org.jdrupes.vmoperator.manager.ServiceMonitor
All Implemented Interfaces:
Iterable<ComponentType>, Channel, ComponentType, Eligible, Manager

public class ServiceMonitor extends AbstractMonitor<io.kubernetes.client.openapi.models.V1Service,io.kubernetes.client.openapi.models.V1ServiceList,VmChannel>
Watches for changes of services.
  • Constructor Details

    • ServiceMonitor

      public ServiceMonitor(Channel componentChannel)
      Instantiates a new display secrets monitor.
      Parameters:
      componentChannel - the component channel
  • Method Details

    • prepareMonitoring

      protected void prepareMonitoring() throws IOException, io.kubernetes.client.openapi.ApiException
      Description copied from class: AbstractMonitor
      Invoked by AbstractMonitor.onStart(Start) after the namespace has been configured and before starting the observer.
      Overrides:
      prepareMonitoring in class AbstractMonitor<io.kubernetes.client.openapi.models.V1Service,io.kubernetes.client.openapi.models.V1ServiceList,VmChannel>
      Throws:
      IOException - Signals that an I/O exception has occurred.
      io.kubernetes.client.openapi.ApiException - the api exception
    • handleChange

      protected void handleChange(K8sClient client, io.kubernetes.client.util.Watch.Response<io.kubernetes.client.openapi.models.V1Service> change)
      Description copied from class: AbstractMonitor
      Handle an observed change.
      Specified by:
      handleChange in class AbstractMonitor<io.kubernetes.client.openapi.models.V1Service,io.kubernetes.client.openapi.models.V1ServiceList,VmChannel>
      Parameters:
      client - the client
      change - the change