com.google.common.util.concurrent
Class ForwardingService

java.lang.Object
  extended by com.google.common.collect.ForwardingObject
      extended by com.google.common.util.concurrent.ForwardingService
All Implemented Interfaces:
Service

@Beta
public abstract class ForwardingService
extends ForwardingObject
implements Service

A Service that forwards all method calls to another service.

Since:
1
Author:
Chris Nokleberg

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.google.common.base.Service
Service.State
 
Constructor Summary
ForwardingService()
           
 
Method Summary
protected abstract  Service delegate()
           
 boolean isRunning()
           
 java.util.concurrent.Future<Service.State> start()
           
 Service.State startAndWait()
           
 Service.State state()
           
 java.util.concurrent.Future<Service.State> stop()
           
 Service.State stopAndWait()
           
 
Methods inherited from class com.google.common.collect.ForwardingObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingService

public ForwardingService()
Method Detail

delegate

protected abstract Service delegate()
Specified by:
delegate in class ForwardingObject

start

public java.util.concurrent.Future<Service.State> start()
Specified by:
start in interface Service

state

public Service.State state()
Specified by:
state in interface Service

stop

public java.util.concurrent.Future<Service.State> stop()
Specified by:
stop in interface Service

startAndWait

public Service.State startAndWait()
Specified by:
startAndWait in interface Service

stopAndWait

public Service.State stopAndWait()
Specified by:
stopAndWait in interface Service

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Service


Copyright © 2010 Google. All Rights Reserved.