Class AbstractSynchronousTransform
- java.lang.Object
- 
- com.inductiveautomation.perspective.gateway.binding.transforms.AbstractSynchronousTransform
 
- 
- All Implemented Interfaces:
- Transform
 - Direct Known Subclasses:
- AbstractMapTransform,- ScriptTransform
 
 public abstract class AbstractSynchronousTransform extends java.lang.Object implements Transform AnTransformwhich takes care of wrapping a blocking transform operation in aCompletableFuture. Implementations only need to overridesynchronousTransformInternal(QualifiedValue)to process their blocking transform work.
- 
- 
Constructor SummaryConstructors Constructor Description AbstractSynchronousTransform()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract QualifiedValuesynchronousTransformInternal(QualifiedValue value)Perform a blocking transformation on aQualifiedValue, returning the transformed value as a QualifiedValue.java.util.concurrent.CompletableFuture<QualifiedValue>transform(QualifiedValue value)When the binding or previous transform emits a value, it will be given to this method.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.TransformresolveReferences, shutdown, startup
 
- 
 
- 
- 
- 
Method Detail- 
synchronousTransformInternalprotected abstract QualifiedValue synchronousTransformInternal(@Nonnull QualifiedValue value) throws java.lang.Throwable Perform a blocking transformation on aQualifiedValue, returning the transformed value as a QualifiedValue.- Parameters:
- value- The input value to transform. The value will never be null.
- Returns:
- The transformed value.
- Throws:
- java.lang.Throwable- If there is any Exception or Error in the transformation.
 
 - 
transformpublic java.util.concurrent.CompletableFuture<QualifiedValue> transform(@Nonnull QualifiedValue value) throws java.lang.Throwable Description copied from interface:TransformWhen the binding or previous transform emits a value, it will be given to this method. The expectation is that the transform will then push the transformed value onto the callback given to it in the factory- Specified by:
- transformin interface- Transform
- Parameters:
- value- The input value to the- Transform. It could be the output value of the binding itself if the transform is first in the chain, or it could be a transformed value if it is after the first in the chain. The input- QualifiedValuecan never be null (though the value it wraps can be null)
- Throws:
- java.lang.Throwable- If there is a problem with the transformation
 
 
- 
 
-