Java com.google.common.util.concurrent Service fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.util.concurrent Service fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.util.concurrent Service.

The text is from its open source code.

Subclass

com.google.common.util.concurrent.Service has subclasses.
Click this link to see all its subclasses.

Implementation

com.google.common.util.concurrent.Service has the following implementations.
Click this link to see all its implementation.

Constructor

Method

voidaddListener(Listener listener, Executor executor)
Registers a Listener to be Executor#execute executed on the given executor.
voidawaitRunning()
Waits for the Service to reach the State#RUNNING running state .
voidawaitRunning(long timeout, TimeUnit unit)
Waits for the Service to reach the State#RUNNING running state for no more than the given time.
voidawaitTerminated()
Waits for the Service to reach the State#TERMINATED terminated state .
voidawaitTerminated(long timeout, TimeUnit unit)
Waits for the Service to reach a terminal state (either Service.State#TERMINATED terminated or Service.State#FAILED failed ) for no more than the given time.
ThrowablefailureCause()
Returns the Throwable that caused this service to fail.
ClassgetClass()
Returns the runtime class of this Object .
booleanisRunning()
Returns true if this service is State#RUNNING running .
ServicestartAsync()
If the service state is State#NEW , this initiates service startup and returns immediately.
Statestate()
Returns the lifecycle state of the service.
ServicestopAsync()
If the service is State#STARTING starting or State#RUNNING running , this initiates service shutdown and returns immediately.
StringtoString()
Returns a string representation of the object.