- java.lang.Object
- 
- com.pervasive.datarush.operators.AbstractLogicalOperator
- 
- com.pervasive.datarush.operators.StreamingOperator
- 
- com.pervasive.datarush.operators.DeferredCompositeOperator
- 
- com.pervasive.datarush.operators.testutils.ErrorSource
 
 
 
 
- 
- All Implemented Interfaces:
- LogicalOperator,- RecordSourceOperator,- SourceOperator<RecordPort>
 
 public final class ErrorSource extends DeferredCompositeOperator implements RecordSourceOperator A record source that throws an error either at composition time or execution time.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringERROR_MESSAGE
 - 
Constructor SummaryConstructors Constructor Description ErrorSource(RecordTokenType outputType, ErrorConfiguration errorConfig)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompose(DeferredCompositionContext ctx)Compose the body of this operator.protected voidcomputeMetadata(StreamingMetadataContext ctx)Implementations must adhere to all of the contracts specified byStreamingOperator.computeMetadata(com.pervasive.datarush.operators.StreamingMetadataContext).ErrorConfigurationgetErrorConfig()RecordPortgetOutput()Gets the record port providing the output data from the source.RecordTokenTypegetOutputType()- 
Methods inherited from class com.pervasive.datarush.operators.DeferredCompositeOperatorcomputeOutputTypes
 - 
Methods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperatordisableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.pervasive.datarush.operators.LogicalOperatordisableParallelism, getInputPorts, getOutputPorts
 
- 
 
- 
- 
- 
Field Detail- 
ERROR_MESSAGEpublic static final String ERROR_MESSAGE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ErrorSourcepublic ErrorSource(RecordTokenType outputType, ErrorConfiguration errorConfig) - Parameters:
- outputType- the type of the record output.
- errorConfig- controls whether error thrown at composition time or runtime
 
 
- 
 - 
Method Detail- 
getOutputTypepublic RecordTokenType getOutputType() 
 - 
getErrorConfigpublic ErrorConfiguration getErrorConfig() 
 - 
getOutputpublic RecordPort getOutput() Description copied from interface:RecordSourceOperatorGets the record port providing the output data from the source.- Specified by:
- getOutputin interface- RecordSourceOperator
- Specified by:
- getOutputin interface- SourceOperator<RecordPort>
- Returns:
- the output port for the source
 
 - 
computeMetadataprotected void computeMetadata(StreamingMetadataContext ctx) Description copied from class:DeferredCompositeOperatorImplementations must adhere to all of the contracts specified byStreamingOperator.computeMetadata(com.pervasive.datarush.operators.StreamingMetadataContext). In addition, DeferredCompositeOperators must declare required metadata so as to satisfy requirements of the operators that are added duringDeferredCompositeOperator.compose(com.pervasive.datarush.operators.DeferredCompositionContext).- Specified by:
- computeMetadatain class- DeferredCompositeOperator
- Parameters:
- ctx- the context
 
 - 
composeprotected void compose(DeferredCompositionContext ctx) Description copied from class:DeferredCompositeOperatorCompose the body of this operator. Implementations should do the following:- Instantiate and configure sub-operators, adding them to the provided context via
    the method OperatorComposable.add(O)
- Create necessary connections via the method OperatorComposable.connect(P, P). This includes connections from the composite's input ports to sub-operators, connections between sub-operators, and connections from sub-operators output ports to the composite's output ports
 - Specified by:
- composein class- DeferredCompositeOperator
- Parameters:
- ctx- the context
 
- Instantiate and configure sub-operators, adding them to the provided context via
    the method 
 
- 
 
-