Package org.apache.nifi.jasn1
Class JASN1Reader
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.jasn1.JASN1Reader
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.controller.ControllerService,RecordReaderFactory
@Tags({"asn","ans1","jasn.1","jasn1","record","reader","parser"})
@CapabilityDescription("Reads ASN.1 content and creates NiFi records. NOTE: ASN.1 schema preparation requires the JDK at runtime for model compilation.")
public class JASN1Reader
extends org.apache.nifi.components.AbstractConfigurableComponent
implements RecordReaderFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.nifi.components.AllowableValue(package private) static final org.apache.nifi.components.PropertyDescriptor(package private) Path(package private) ClassLoaderprivate static final org.apache.nifi.components.AllowableValueprivate Stringprivate static final org.apache.nifi.components.PropertyDescriptorNot included!private org.apache.nifi.components.PropertyValue(package private) org.apache.nifi.logging.ComponentLogprivate final List<org.apache.nifi.components.PropertyDescriptor> private static final org.apache.nifi.components.PropertyDescriptorNot included!private org.apache.nifi.components.PropertyValueprivate static final org.apache.nifi.components.PropertyDescriptorprivate static final org.apache.nifi.components.PropertyDescriptorprivate org.apache.nifi.components.PropertyValueprivate org.apache.nifi.components.PropertyValueprivate static final org.apache.nifi.components.PropertyDescriptorprivate static final org.apache.nifi.components.PropertyDescriptorprivate final RecordSchemaProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcompileAsnToClass(String... asnFilePaths) createRecordReader(Map<String, String> variables, InputStream in, long inputLength, org.apache.nifi.logging.ComponentLog logger) protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) (package private) void(package private) com.beanit.asn1bean.compiler.model.AsnModelgetJavaModelFromAsn1File(String inputFileName) protected List<org.apache.nifi.components.PropertyDescriptor> (package private) StringguessRootClassName(String rootModelName) voidinitialize(org.apache.nifi.controller.ControllerServiceInitializationContext context) voidmigrateProperties(org.apache.nifi.migration.PropertyConfiguration config) voidvoidonEnabled(org.apache.nifi.controller.ConfigurationContext context) Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.controller.ControllerService
isStatefulMethods inherited from interface org.apache.nifi.serialization.RecordReaderFactory
createRecordReader
-
Field Details
-
ROOT_MODEL_NAME
private static final org.apache.nifi.components.PropertyDescriptor ROOT_MODEL_NAME -
ROOT_CLASS_NAME
private static final org.apache.nifi.components.PropertyDescriptor ROOT_CLASS_NAME -
RECORD_FIELD
private static final org.apache.nifi.components.PropertyDescriptor RECORD_FIELDNot included! To make this service as simple as possible, records are to be expected to correspond to a concrete ASN type. Not removing though, should it be required in the future. -
ASN_FILES
static final org.apache.nifi.components.PropertyDescriptor ASN_FILES -
ITERATOR_PROVIDER_CLASS_NAME
private static final org.apache.nifi.components.PropertyDescriptor ITERATOR_PROVIDER_CLASS_NAMENot included! To make this service as simple as possible, classpath modification is not supported currently as it's benefit would be questionable. Not removing though, should it be required in the future. -
DEFAULT
private static final org.apache.nifi.components.AllowableValue DEFAULT -
ADDITIONAL_PREPROCESSING
private static final org.apache.nifi.components.AllowableValue ADDITIONAL_PREPROCESSING -
SCHEMA_PREPARATION_STRATEGY
private static final org.apache.nifi.components.PropertyDescriptor SCHEMA_PREPARATION_STRATEGY -
SCHEMA_PREPARATION_DIRECTORY
private static final org.apache.nifi.components.PropertyDescriptor SCHEMA_PREPARATION_DIRECTORY -
propertyDescriptors
-
identifier
-
logger
org.apache.nifi.logging.ComponentLog logger -
schemaProvider
-
asnOutDir
-
rootModelNameProperty
private volatile org.apache.nifi.components.PropertyValue rootModelNameProperty -
rootClassNameProperty
private volatile org.apache.nifi.components.PropertyValue rootClassNameProperty -
recordFieldProperty
private volatile org.apache.nifi.components.PropertyValue recordFieldProperty -
iteratorProviderProperty
private volatile org.apache.nifi.components.PropertyValue iteratorProviderProperty -
customClassLoader
-
-
Constructor Details
-
JASN1Reader
public JASN1Reader()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
initialize
public void initialize(org.apache.nifi.controller.ControllerServiceInitializationContext context) - Specified by:
initializein interfaceorg.apache.nifi.controller.ControllerService
-
customValidate
protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) - Overrides:
customValidatein classorg.apache.nifi.components.AbstractConfigurableComponent
-
onEnabled
@OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context) -
migrateProperties
public void migrateProperties(org.apache.nifi.migration.PropertyConfiguration config) - Specified by:
migratePropertiesin interfaceorg.apache.nifi.controller.ControllerService
-
compileAsnToClass
-
onDisabled
@OnDisabled public void onDisabled() -
deleteAsnOutDir
void deleteAsnOutDir() -
getIdentifier
- Specified by:
getIdentifierin interfaceorg.apache.nifi.components.ConfigurableComponent
-
createRecordReader
public RecordReader createRecordReader(Map<String, String> variables, InputStream in, long inputLength, org.apache.nifi.logging.ComponentLog logger) - Specified by:
createRecordReaderin interfaceRecordReaderFactory
-
getJavaModelFromAsn1File
com.beanit.asn1bean.compiler.model.AsnModel getJavaModelFromAsn1File(String inputFileName) throws FileNotFoundException, antlr.TokenStreamException, antlr.RecognitionException - Throws:
FileNotFoundExceptionantlr.TokenStreamExceptionantlr.RecognitionException
-
guessRootClassName
-