public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
Modifier and Type | Class and Description |
---|---|
static class |
StandardRootGroupPort.StandardPortAuthorizationResult |
DEFAULT_TIME_UNIT, DEFAULT_YIELD_PERIOD, DEFAULT_YIELD_TIME_UNIT, MINIMUM_PENALIZATION_MILLIS, MINIMUM_YIELD_MILLIS, PORT_RELATIONSHIP
MINIMUM_SCHEDULING_NANOS
Constructor and Description |
---|
StandardRootGroupPort(java.lang.String id,
java.lang.String name,
ProcessGroup processGroup,
TransferDirection direction,
ConnectableType type,
Authorizer authorizer,
BulletinRepository bulletinRepository,
ProcessScheduler scheduler,
boolean secure,
NiFiProperties nifiProperties) |
Modifier and Type | Method and Description |
---|---|
PortAuthorizationResult |
checkUserAuthorization(NiFiUser user)
Verifies that the specified user is authorized to interact with this port
and returns a
PortAuthorizationResult indicating why the user is
unauthorized if this assumption fails |
PortAuthorizationResult |
checkUserAuthorization(java.lang.String dn)
Verifies that the specified user is authorized to interact with this port
and returns a
PortAuthorizationResult indicating why the user is
unauthorized if this assumption fails
RootGroupPort.checkUserAuthorization(NiFiUser) should be used if applicable
because NiFiUser has additional context such as chained user. |
java.lang.String |
getComponentType() |
java.util.Set<java.lang.String> |
getGroupAccessControl() |
java.util.Collection<Relationship> |
getRelationships() |
SchedulingStrategy |
getSchedulingStrategy() |
java.util.Set<java.lang.String> |
getUserAccessControl() |
java.util.Collection<ValidationResult> |
getValidationErrors() |
boolean |
isSideEffectFree() |
boolean |
isTransmitting() |
boolean |
isTriggerWhenEmpty() |
boolean |
isValid() |
void |
onSchedulingStart()
This method is called just before a Port is scheduled to run, giving the
Port a chance to initialize any resources needed.
|
void |
onTrigger(ProcessContext context,
ProcessSession session) |
void |
onTrigger(ProcessContext context,
ProcessSessionFactory sessionFactory)
The method called when this processor is triggered to operate by the
controller.
|
int |
receiveFlowFiles(Peer peer,
ServerProtocol serverProtocol)
Receives data from the given stream
|
void |
setGroupAccessControl(java.util.Set<java.lang.String> groups) |
void |
setUserAccessControl(java.util.Set<java.lang.String> users) |
void |
shutdown() |
int |
transferFlowFiles(Peer peer,
ServerProtocol serverProtocol)
Transfers data to the given stream
|
addConnection, disable, enable, getComments, getConnectableType, getConnections, getConnections, getIdentifier, getIncomingConnections, getMaxConcurrentTasks, getName, getParentAuthorizable, getPenalizationPeriod, getPenalizationPeriod, getPosition, getProcessGroup, getProcessGroupIdentifier, getRelationship, getResource, getScheduledState, getSchedulingPeriod, getSchedulingPeriod, getYieldExpiration, getYieldPeriod, getYieldPeriod, hasIncomingConnection, isAutoTerminated, isLossTolerant, isRunning, removeConnection, setComments, setLossTolerant, setMaxConcurrentTasks, setName, setPenalizationPeriod, setPosition, setProcessGroup, setScheduldingPeriod, setYieldPeriod, toString, updateConnection, verifyCanClearState, verifyCanDelete, verifyCanDelete, verifyCanDisable, verifyCanEnable, verifyCanStart, verifyCanStop, verifyCanUpdate, yield
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addConnection, getComments, getConnectableType, getConnections, getConnections, getIdentifier, getIncomingConnections, getName, getPenalizationPeriod, getPenalizationPeriod, getProcessGroup, getRelationship, getYieldExpiration, getYieldPeriod, getYieldPeriod, hasIncomingConnection, isAutoTerminated, isLossTolerant, removeConnection, setComments, setLossTolerant, setName, setPenalizationPeriod, setProcessGroup, setYieldPeriod, updateConnection, verifyCanClearState, verifyCanDelete, verifyCanDelete, verifyCanDisable, verifyCanEnable, verifyCanStart, verifyCanStop, verifyCanUpdate, yield
getMaxConcurrentTasks, getScheduledState, getSchedulingPeriod, getSchedulingPeriod, isRunning, setMaxConcurrentTasks, setScheduldingPeriod
getProcessGroupIdentifier
authorize, authorize, checkAuthorization, checkAuthorization, getParentAuthorizable, getRequestedResource, getResource, isAuthorized
getPosition, setPosition
public StandardRootGroupPort(java.lang.String id, java.lang.String name, ProcessGroup processGroup, TransferDirection direction, ConnectableType type, Authorizer authorizer, BulletinRepository bulletinRepository, ProcessScheduler scheduler, boolean secure, NiFiProperties nifiProperties)
public java.util.Collection<Relationship> getRelationships()
getRelationships
in interface Connectable
getRelationships
in class AbstractPort
public boolean isTriggerWhenEmpty()
isTriggerWhenEmpty
in interface Connectable
Triggerable.onTrigger(org.apache.nifi.processor.ProcessContext, org.apache.nifi.processor.ProcessSessionFactory)
should be called even when this Connectable has no FlowFiles queued for
processingpublic void onTrigger(ProcessContext context, ProcessSessionFactory sessionFactory)
Triggerable
The method called when this processor is triggered to operate by the controller. This method may be called concurrently from different threads. When this method is called depends on how this processor is configured within a controller to be triggered (timing or event based).
The processor may commit, roll back, or allow the framework to automatically manage the session. If the sessions are to be managed by the framework (recommended) then what it will do depends on several factors. If the method call returns due to an exception then the session will be rolled back. If the method returns normally then the session will be committed or the framework may use the session again for another processor down stream
onTrigger
in interface Triggerable
onTrigger
in class AbstractPort
context
- in which the component is triggeredsessionFactory
- used to generate ProcessSession
s to use for
operating on flow files within the repositorypublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger
in class AbstractPort
ProcessException
public boolean isValid()
isValid
in interface Port
isValid
in class AbstractPort
public java.util.Collection<ValidationResult> getValidationErrors()
getValidationErrors
in interface Connectable
public boolean isTransmitting()
isTransmitting
in interface RootGroupPort
public void setGroupAccessControl(java.util.Set<java.lang.String> groups)
setGroupAccessControl
in interface RootGroupPort
public java.util.Set<java.lang.String> getGroupAccessControl()
getGroupAccessControl
in interface RootGroupPort
public void setUserAccessControl(java.util.Set<java.lang.String> users)
setUserAccessControl
in interface RootGroupPort
public java.util.Set<java.lang.String> getUserAccessControl()
getUserAccessControl
in interface RootGroupPort
public void shutdown()
shutdown
in interface Port
shutdown
in class AbstractPort
public void onSchedulingStart()
Port
This method is called just before a Port is scheduled to run, giving the Port a chance to initialize any resources needed.
onSchedulingStart
in interface Port
onSchedulingStart
in class AbstractPort
public PortAuthorizationResult checkUserAuthorization(java.lang.String dn)
RootGroupPort
PortAuthorizationResult
indicating why the user is
unauthorized if this assumption fails
RootGroupPort.checkUserAuthorization(NiFiUser)
should be used if applicable
because NiFiUser has additional context such as chained user.checkUserAuthorization
in interface RootGroupPort
dn
- dn of userpublic PortAuthorizationResult checkUserAuthorization(NiFiUser user)
RootGroupPort
PortAuthorizationResult
indicating why the user is
unauthorized if this assumption failscheckUserAuthorization
in interface RootGroupPort
user
- to authorizepublic int receiveFlowFiles(Peer peer, ServerProtocol serverProtocol) throws NotAuthorizedException, BadRequestException, RequestExpiredException
RootGroupPort
receiveFlowFiles
in interface RootGroupPort
peer
- peerserverProtocol
- protocolNotAuthorizedException
- naeBadRequestException
- breRequestExpiredException
- reepublic int transferFlowFiles(Peer peer, ServerProtocol serverProtocol) throws NotAuthorizedException, BadRequestException, RequestExpiredException
RootGroupPort
transferFlowFiles
in interface RootGroupPort
peer
- peerserverProtocol
- protocolNotAuthorizedException
- naeBadRequestException
- breRequestExpiredException
- reepublic SchedulingStrategy getSchedulingStrategy()
getSchedulingStrategy
in interface Connectable
public boolean isSideEffectFree()
isSideEffectFree
in interface Connectable
public java.lang.String getComponentType()
getComponentType
in interface Connectable