org.terracotta.management.call
Class ContextualReturn<T>
java.lang.Object
org.terracotta.management.call.ContextualReturn<T>
- All Implemented Interfaces:
- Serializable
public final class ContextualReturn<T>
- extends Object
- implements Serializable
This class holds the results of the calls on each context.
If a call was not possible to make on a context, because the context was not supported or the capability not found,
then the method hasValue() will return false.
You an call getValue() only if there has been a result, event if it is null.
- Author:
- Mathieu Carbou
- See Also:
- Serialized Form
hasValue
public boolean hasValue()
getValue
public T getValue()
throws NoSuchElementException
- Throws:
NoSuchElementException
getContext
public Context getContext()
of
public static <T> ContextualReturn<T> of(String capability,
Context context,
T result)
empty
public static <T> ContextualReturn<T> empty(String capability,
Context context)
getCapability
public String getCapability()
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2016. All Rights Reserved.