org.apache.nifi.controller.NodeTypeProvider Java Examples

The following examples show how to use org.apache.nifi.controller.NodeTypeProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StandardControllerServiceProviderTest.java    From nifi with Apache License 2.0 6 votes vote down vote up
private ControllerServiceNode createControllerService(final String type, final String id, final BundleCoordinate bundleCoordinate, final ControllerServiceProvider serviceProvider) {
    final ControllerServiceNode serviceNode = new ExtensionBuilder()
        .identifier(id)
        .type(type)
        .bundleCoordinate(bundleCoordinate)
        .controllerServiceProvider(serviceProvider)
        .processScheduler(Mockito.mock(ProcessScheduler.class))
        .nodeTypeProvider(Mockito.mock(NodeTypeProvider.class))
        .validationTrigger(Mockito.mock(ValidationTrigger.class))
        .reloadComponent(Mockito.mock(ReloadComponent.class))
        .variableRegistry(variableRegistry)
        .stateManagerProvider(Mockito.mock(StateManagerProvider.class))
        .extensionManager(extensionManager)
        .buildControllerService();

    return serviceNode;
}
 
Example #2
Source File: TestStandardControllerServiceProvider.java    From nifi with Apache License 2.0 6 votes vote down vote up
private ControllerServiceNode createControllerService(final String type, final String id, final BundleCoordinate bundleCoordinate, final ControllerServiceProvider serviceProvider) {
    final ControllerServiceNode serviceNode = new ExtensionBuilder()
        .identifier(id)
        .type(type)
        .bundleCoordinate(bundleCoordinate)
        .controllerServiceProvider(serviceProvider)
        .processScheduler(Mockito.mock(ProcessScheduler.class))
        .nodeTypeProvider(Mockito.mock(NodeTypeProvider.class))
        .validationTrigger(Mockito.mock(ValidationTrigger.class))
        .reloadComponent(Mockito.mock(ReloadComponent.class))
        .variableRegistry(variableRegistry)
        .stateManagerProvider(Mockito.mock(StateManagerProvider.class))
        .extensionManager(extensionManager)
        .buildControllerService();

    serviceProvider.onControllerServiceAdded(serviceNode);

    return serviceNode;
}
 
Example #3
Source File: StandardControllerServiceProviderIT.java    From nifi with Apache License 2.0 6 votes vote down vote up
private ControllerServiceNode createControllerService(final String type, final String id, final BundleCoordinate bundleCoordinate, final ControllerServiceProvider serviceProvider) {
    final ControllerServiceNode serviceNode = new ExtensionBuilder()
        .identifier(id)
        .type(type)
        .bundleCoordinate(bundleCoordinate)
        .controllerServiceProvider(serviceProvider)
        .processScheduler(Mockito.mock(ProcessScheduler.class))
        .nodeTypeProvider(Mockito.mock(NodeTypeProvider.class))
        .validationTrigger(Mockito.mock(ValidationTrigger.class))
        .reloadComponent(Mockito.mock(ReloadComponent.class))
        .variableRegistry(variableRegistry)
        .stateManagerProvider(Mockito.mock(StateManagerProvider.class))
        .extensionManager(extensionManager)
        .buildControllerService();

    serviceProvider.onControllerServiceAdded(serviceNode);

    return serviceNode;
}
 
Example #4
Source File: StatelessProcessorInitializationContext.java    From nifi with Apache License 2.0 5 votes vote down vote up
public NodeTypeProvider getNodeTypeProvider() {
    return new NodeTypeProvider() {
        public boolean isClustered() {
            return false;
        }

        public boolean isPrimary() {
            return false;
        }
    };
}
 
Example #5
Source File: StatelessProcessContext.java    From nifi with Apache License 2.0 5 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return new NodeTypeProvider() {
        @Override
        public boolean isClustered() {
            return false;
        }
        @Override
        public boolean isPrimary() {
            return true;
        }
    };
}
 
Example #6
Source File: StatelessControllerServiceInitializationContext.java    From nifi with Apache License 2.0 5 votes vote down vote up
public NodeTypeProvider getNodeTypeProvider() {
    return new NodeTypeProvider() {
        public boolean isClustered() {
            return false;
        }

        public boolean isPrimary() {
            return false;
        }
    };
}
 
Example #7
Source File: StandardProcessorInitializationContext.java    From localization_nifi with Apache License 2.0 5 votes vote down vote up
public StandardProcessorInitializationContext(
        final String identifier, final ComponentLog componentLog,
        final ControllerServiceProvider serviceProvider, final NodeTypeProvider nodeTypeProvider,
        final NiFiProperties nifiProperties) {
    this.identifier = identifier;
    this.logger = componentLog;
    this.serviceProvider = serviceProvider;
    this.nodeTypeProvider = nodeTypeProvider;
    this.nifiProperties = nifiProperties;
}
 
Example #8
Source File: StandardReportingInitializationContext.java    From nifi with Apache License 2.0 5 votes vote down vote up
public StandardReportingInitializationContext(final String id, final String name, final SchedulingStrategy schedulingStrategy, final String schedulingPeriod,
                                              final ComponentLog logger, final ControllerServiceProvider serviceProvider, final KerberosConfig kerberosConfig,
                                              final NodeTypeProvider nodeTypeProvider) {
    this.id = id;
    this.name = name;
    this.schedulingPeriod = schedulingPeriod;
    this.serviceProvider = serviceProvider;
    this.schedulingStrategy = schedulingStrategy;
    this.logger = logger;
    this.kerberosConfig = kerberosConfig;
    this.nodeTypeProvider = nodeTypeProvider;
}
 
Example #9
Source File: StandardProcessorInitializationContext.java    From nifi with Apache License 2.0 5 votes vote down vote up
public StandardProcessorInitializationContext(final String identifier, final ComponentLog componentLog,
        final ControllerServiceProvider serviceProvider, final NodeTypeProvider nodeTypeProvider,
        final KerberosConfig kerberosConfig) {
    this.identifier = identifier;
    this.logger = componentLog;
    this.serviceProvider = serviceProvider;
    this.nodeTypeProvider = nodeTypeProvider;
    this.kerberosConfig = kerberosConfig;
}
 
Example #10
Source File: StandardControllerServiceInitializationContext.java    From nifi with Apache License 2.0 5 votes vote down vote up
public StandardControllerServiceInitializationContext(
        final String identifier, final ComponentLog logger,
        final ControllerServiceProvider serviceProvider, final StateManager stateManager,
        final KerberosConfig kerberosConfig, final NodeTypeProvider nodeTypeProvider) {
    this.id = identifier;
    this.logger = logger;
    this.serviceProvider = serviceProvider;
    this.stateManager = stateManager;
    this.kerberosConfig = kerberosConfig;
    this.nodeTypeProvider = nodeTypeProvider;
}
 
Example #11
Source File: StandardProcessorInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return nodeTypeProvider;
}
 
Example #12
Source File: StandardReportingInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return nodeTypeProvider;
}
 
Example #13
Source File: StandardControllerServiceInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return nodeTypeProvider;
}
 
Example #14
Source File: MockProcessorInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return context;
}
 
Example #15
Source File: MockControllerServiceInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return null;
}
 
Example #16
Source File: MockProcessorInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return new MockNodeTypeProvider();
}
 
Example #17
Source File: MockReportingInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return null;
}
 
Example #18
Source File: MockReportingInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return null;
}
 
Example #19
Source File: MockControllerServiceInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return this;
}
 
Example #20
Source File: DocumentationReportingInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return nodeTypeProvider;
}
 
Example #21
Source File: DocumentationControllerServiceInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return null;
}
 
Example #22
Source File: DocumentationProcessorInitializationContext.java    From nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return nodeTypeProvider;
}
 
Example #23
Source File: MockReportingInitializationContext.java    From nifi-minifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return null;
}
 
Example #24
Source File: MockProcessorInitializationContext.java    From nifi-minifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return new MockNodeTypeProvider();
}
 
Example #25
Source File: StandardProcessorInitializationContext.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return nodeTypeProvider;
}
 
Example #26
Source File: MockProcessorInitializationContext.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return new MockNodeTypeProvider();
}
 
Example #27
Source File: MockProcessorInitializationContext.java    From localization_nifi with Apache License 2.0 4 votes vote down vote up
@Override
public NodeTypeProvider getNodeTypeProvider() {
    return context;
}
 
Example #28
Source File: ProcessorInitializationContext.java    From localization_nifi with Apache License 2.0 2 votes vote down vote up
/**
 * @return the {@link NodeTypeProvider} which can be used to detect the node
 * type of this NiFi instance.
 */
NodeTypeProvider getNodeTypeProvider();
 
Example #29
Source File: AbstractSessionFactoryProcessor.java    From nifi with Apache License 2.0 2 votes vote down vote up
/**
 * @return the {@link NodeTypeProvider} that was passed to the
 * {@link #init(ProcessorInitializationContext)} method
 */
protected final NodeTypeProvider getNodeTypeProvider() {
    return nodeTypeProvider;
}
 
Example #30
Source File: ProcessorInitializationContext.java    From nifi with Apache License 2.0 2 votes vote down vote up
/**
 * @return the {@link NodeTypeProvider} which can be used to detect the node
 * type of this NiFi instance.
 */
NodeTypeProvider getNodeTypeProvider();