Class ConvertorProcessor<F extends org.opendaylight.yangtools.yang.binding.DataContainer,T,D extends ConvertorData>
java.lang.Object
org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ConvertorProcessor<F,T,D>
- Type Parameters:
F
- the source typeT
- the result typeD
- the type of convertor data
public class ConvertorProcessor<F extends org.opendaylight.yangtools.yang.binding.DataContainer,T,D extends ConvertorData>
extends Object
Processes source and return result based on convertor cases added to this processor.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCase
(ConvertorCase<?, T, D> processorCase) Add convertor processor case.process
(F source, D data, ConvertorExecutor convertorExecutor) Process source and return result based on convertor cases, or empty if no match is found.process
(F source, ConvertorExecutor convertorExecutor) Process source and return result based on convertor cases, or empty if no match is found.setDefaultCase
(ConvertorCase<?, T, D> defaultCase) Sets default case, what will be used when we do not find any matching convertor case for source.
-
Constructor Details
-
ConvertorProcessor
public ConvertorProcessor()
-
-
Method Details
-
addCase
Add convertor processor case.- Parameters:
processorCase
- the processor case- Returns:
- the convertor processor
-
process
Process source and return result based on convertor cases, or empty if no match is found.- Parameters:
source
- the sourceconvertorExecutor
- convertor executor- Returns:
- the optional
-
process
Process source and return result based on convertor cases, or empty if no match is found.- Parameters:
source
- the sourcedata
- the dataconvertorExecutor
- convertor executor- Returns:
- the optional
-
setDefaultCase
Sets default case, what will be used when we do not find any matching convertor case for source.- Parameters:
defaultCase
- the default case- Returns:
- the default case
-