public abstract class AbstractService extends com.google.common.util.concurrent.AbstractService implements Service
Service
interface covering service name and equivalence.Modifier | Constructor and Description |
---|---|
protected |
AbstractService()
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkRunning() |
protected void |
checkState(com.google.common.util.concurrent.Service.State first,
com.google.common.util.concurrent.Service.State... rest) |
protected void |
checkState(java.util.Set<com.google.common.util.concurrent.Service.State> states) |
boolean |
equals(java.lang.Object o)
Compares the specified object with this service for equality.
|
java.lang.String |
getName()
Returns service name.
|
int |
hashCode()
Returns the hash code value for this service.
|
java.lang.String |
toString()
Converts service to string consisting of its name and operational
status.
|
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, doStart, doStop, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync
protected final void checkState(com.google.common.util.concurrent.Service.State first, com.google.common.util.concurrent.Service.State... rest)
protected final void checkState(java.util.Set<com.google.common.util.concurrent.Service.State> states)
protected final void checkRunning()
public final 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
otherwisepublic final int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String toString()
toString
in class com.google.common.util.concurrent.AbstractService