public interface Service extends Nameable, com.google.common.util.concurrent.Service
Uniqueness of a service is determined by its qualified name.
Two Service
instances with the same qualified name should
be implemented by the same class, provide the same functionality
and behave the same way.
Implementors of this interface are strongly encouraged to extend one of the abstract classes in this package which implement this interface and make the threading and state management easier.
Service
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Compares the specified object with this service for equality.
|
int |
hashCode()
Returns the hash code value for this service.
|
boolean equals(@Nullable java.lang.Object o)
true
if the specified object is also service
and the two services have the same name. This definition ensures
that this method works properly across different implementations
of the service interface.equals
in class java.lang.Object
o
- an object to be compared for equality with this servicetrue
if the specified object is equal to
this service, false
otherwiseint hashCode()
hashCode
in class java.lang.Object