org.jclouds.predicates
Class PredicateCallable<Result>

java.lang.Object
  extended by org.jclouds.predicates.PredicateCallable<Result>
All Implemented Interfaces:
com.google.common.base.Predicate<Void>, Callable<Result>, PredicateWithResult<Void,Result>

@Beta
public abstract class PredicateCallable<Result>
extends Object
implements PredicateWithResult<Void,Result>, Callable<Result>

Provides a facility to convert an arbitrary Callable to a Predicate, implementing PredicateWithResult, for use e.g. with Retryables.retryGetting... methods


Constructor Summary
PredicateCallable()
           
 
Method Summary
 boolean apply(Void input)
           
 Throwable getLastFailure()
           
 Result getResult()
           
protected  boolean isAcceptable(Result result)
           
protected  void onCompletion()
           
protected  void onFailure()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Predicate
equals
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Constructor Detail

PredicateCallable

public PredicateCallable()
Method Detail

apply

public boolean apply(Void input)
Specified by:
apply in interface com.google.common.base.Predicate<Void>

onFailure

protected void onFailure()

onCompletion

protected void onCompletion()

isAcceptable

protected boolean isAcceptable(Result result)

getResult

public Result getResult()
Specified by:
getResult in interface PredicateWithResult<Void,Result>

getLastFailure

public Throwable getLastFailure()
Specified by:
getLastFailure in interface PredicateWithResult<Void,Result>


Copyright © 2009-2012 jclouds. All Rights Reserved.