Package org.jclouds.rest.internal
Class InvokeHttpMethod
java.lang.Object
org.jclouds.rest.internal.InvokeHttpMethod
- All Implemented Interfaces:
com.google.common.base.Function<Invocation,
,Object> Function<Invocation,
Object>
public class InvokeHttpMethod
extends Object
implements com.google.common.base.Function<Invocation,Object>
-
Method Summary
Modifier and TypeMethodDescriptionapply
(Invocation in) boolean
int
hashCode()
invoke
(Invocation invocation) invokes the HttpCommand associated withinvocation
,parses its response
, and applies afallback
if aThrowable
is encountered.invokeWithTimeout
(Invocation invocation, long limitNanos) callsinvoke(Invocation)
, timing out after the specified time limit.toString()
-
Method Details
-
apply
- Specified by:
apply
in interfacecom.google.common.base.Function<Invocation,
Object> - Specified by:
apply
in interfaceFunction<Invocation,
Object>
-
invoke
invokes the HttpCommand associated withinvocation
,parses its response
, and applies afallback
if aThrowable
is encountered. -
invokeWithTimeout
callsinvoke(Invocation)
, timing out after the specified time limit. If the target method call finished before the limit is reached, the return value or exception is propagated to the caller exactly as-is. If, on the other hand, the time limit is reached, we attempt to abort the call to the target, and throw aninvalid reference
UncheckedTimeoutException
- Parameters:
invocation
- the Invocation to invoke viainvoke(Invocation)
limitNanos
- with timeoutUnit, the maximum length of time to wait in nanoseconds- See Also:
-
equals
- Specified by:
equals
in interfacecom.google.common.base.Function<Invocation,
Object> - Overrides:
equals
in classObject
-
hashCode
public int hashCode() -
toString
-