Class ServiceInstancesChangedEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class ServiceInstancesChangedEvent
    extends org.springframework.context.ApplicationEvent
    An event raised when the instances of one service has been changed.
    Author:
    Mercy
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceInstancesChangedEvent​(java.lang.String serviceName, java.util.List<org.springframework.cloud.client.ServiceInstance> serviceInstances)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.springframework.cloud.client.ServiceInstance> getServiceInstances()  
      java.lang.String getServiceName()  
      boolean isProcessed()
      Current event has been processed or not.
      void processed()
      Mark current event being processed.
      • Methods inherited from class org.springframework.context.ApplicationEvent

        getTimestamp
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServiceInstancesChangedEvent

        public ServiceInstancesChangedEvent​(java.lang.String serviceName,
                                            java.util.List<org.springframework.cloud.client.ServiceInstance> serviceInstances)
        Parameters:
        serviceName - The name of service that was changed
        serviceInstances - all service instances
        Throws:
        java.lang.IllegalArgumentException - if source is null.
    • Method Detail

      • getServiceName

        public java.lang.String getServiceName()
        Returns:
        The name of service that was changed
      • getServiceInstances

        public java.util.List<org.springframework.cloud.client.ServiceInstance> getServiceInstances()
        Returns:
        all service instances.
      • processed

        public void processed()
        Mark current event being processed.
      • isProcessed

        public boolean isProcessed()
        Current event has been processed or not.
        Returns:
        if processed, return true, or false