Class ServiceInstancesChangedEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- io.microsphere.spring.cloud.client.event.ServiceInstancesChangedEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ServiceInstancesChangedEvent extends org.springframework.context.ApplicationEventAn event raised when theinstancesof one service has been changed.- Author:
- Mercy
- See Also:
- Serialized Form
-
-
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.StringgetServiceName()booleanisProcessed()Current event has been processed or not.voidprocessed()Mark current event being processed.
-
-
-
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 changedserviceInstances- allservice 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, orfalse
-
-