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_RELATIONSHIPMINIMUM_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, yieldclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddConnection, 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, yieldgetMaxConcurrentTasks, getScheduledState, getSchedulingPeriod, getSchedulingPeriod, isRunning, setMaxConcurrentTasks, setScheduldingPeriodgetProcessGroupIdentifierauthorize, authorize, checkAuthorization, checkAuthorization, getParentAuthorizable, getRequestedResource, getResource, isAuthorizedgetPosition, setPositionpublic 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 ConnectablegetRelationships in class AbstractPortpublic boolean isTriggerWhenEmpty()
isTriggerWhenEmpty in interface ConnectableTriggerable.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)
TriggerableThe 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 TriggerableonTrigger in class AbstractPortcontext - in which the component is triggeredsessionFactory - used to generate ProcessSessions to use for
operating on flow files within the repositorypublic void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractPortProcessExceptionpublic boolean isValid()
isValid in interface PortisValid in class AbstractPortpublic java.util.Collection<ValidationResult> getValidationErrors()
getValidationErrors in interface Connectablepublic boolean isTransmitting()
isTransmitting in interface RootGroupPortpublic void setGroupAccessControl(java.util.Set<java.lang.String> groups)
setGroupAccessControl in interface RootGroupPortpublic java.util.Set<java.lang.String> getGroupAccessControl()
getGroupAccessControl in interface RootGroupPortpublic void setUserAccessControl(java.util.Set<java.lang.String> users)
setUserAccessControl in interface RootGroupPortpublic java.util.Set<java.lang.String> getUserAccessControl()
getUserAccessControl in interface RootGroupPortpublic void shutdown()
shutdown in interface Portshutdown in class AbstractPortpublic void onSchedulingStart()
PortThis method is called just before a Port is scheduled to run, giving the Port a chance to initialize any resources needed.
onSchedulingStart in interface PortonSchedulingStart in class AbstractPortpublic PortAuthorizationResult checkUserAuthorization(java.lang.String dn)
RootGroupPortPortAuthorizationResult 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 RootGroupPortdn - dn of userpublic PortAuthorizationResult checkUserAuthorization(NiFiUser user)
RootGroupPortPortAuthorizationResult indicating why the user is
unauthorized if this assumption failscheckUserAuthorization in interface RootGroupPortuser - to authorizepublic int receiveFlowFiles(Peer peer, ServerProtocol serverProtocol) throws NotAuthorizedException, BadRequestException, RequestExpiredException
RootGroupPortreceiveFlowFiles in interface RootGroupPortpeer - peerserverProtocol - protocolNotAuthorizedException - naeBadRequestException - breRequestExpiredException - reepublic int transferFlowFiles(Peer peer, ServerProtocol serverProtocol) throws NotAuthorizedException, BadRequestException, RequestExpiredException
RootGroupPorttransferFlowFiles in interface RootGroupPortpeer - peerserverProtocol - protocolNotAuthorizedException - naeBadRequestException - breRequestExpiredException - reepublic SchedulingStrategy getSchedulingStrategy()
getSchedulingStrategy in interface Connectablepublic boolean isSideEffectFree()
isSideEffectFree in interface Connectablepublic java.lang.String getComponentType()
getComponentType in interface Connectable