Class ServiceInstancesChangedEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
io.microsphere.spring.cloud.client.event.ServiceInstancesChangedEvent
- All Implemented Interfaces:
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:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionServiceInstancesChangedEvent(String serviceName, List<org.springframework.cloud.client.ServiceInstance> serviceInstances) -
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.cloud.client.ServiceInstance>booleanCurrent event has been processed or not.voidMark current event being processed.Methods inherited from class org.springframework.context.ApplicationEvent
getTimestampMethods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
ServiceInstancesChangedEvent
public ServiceInstancesChangedEvent(String serviceName, List<org.springframework.cloud.client.ServiceInstance> serviceInstances) - Parameters:
serviceName- The name of service that was changedserviceInstances- allservice instances- Throws:
IllegalArgumentException- if source is null.
-
-
Method Details
-
getServiceName
- Returns:
- The name of service that was changed
-
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, orfalse
-