public class StandardReportingInitializationContext extends java.lang.Object implements ReportingInitializationContext, ControllerServiceLookup
Constructor and Description |
---|
StandardReportingInitializationContext(java.lang.String id,
java.lang.String name,
SchedulingStrategy schedulingStrategy,
java.lang.String schedulingPeriod,
ComponentLog logger,
ControllerServiceProvider serviceProvider,
NiFiProperties nifiProperties) |
Modifier and Type | Method and Description |
---|---|
ControllerService |
getControllerService(java.lang.String identifier) |
java.util.Set<java.lang.String> |
getControllerServiceIdentifiers(java.lang.Class<? extends ControllerService> serviceType) |
ControllerServiceLookup |
getControllerServiceLookup() |
java.lang.String |
getControllerServiceName(java.lang.String serviceIdentifier) |
java.lang.String |
getIdentifier() |
java.io.File |
getKerberosConfigurationFile()
The Kerberos configuration file (typically krb5.conf) that will be used
by this JVM during all Kerberos operations.
|
java.io.File |
getKerberosServiceKeytab()
The File instance for the Kerberos service keytab.
|
java.lang.String |
getKerberosServicePrincipal()
The Kerberos service principal used by NiFi to communicate with the KDC
in order to obtain tickets on behalf of NiFi.
|
ComponentLog |
getLogger() |
java.lang.String |
getName() |
java.lang.String |
getSchedulingPeriod() |
long |
getSchedulingPeriod(java.util.concurrent.TimeUnit timeUnit)
Returns the amount of time, in the given
TimeUnit that will
elapsed between the return of one execution of the
ReportingTask 's
onTrigger method and
the time at which the method is invoked again. |
SchedulingStrategy |
getSchedulingStrategy() |
boolean |
isControllerServiceEnabled(ControllerService service) |
boolean |
isControllerServiceEnabled(java.lang.String serviceIdentifier) |
boolean |
isControllerServiceEnabling(java.lang.String serviceIdentifier) |
public StandardReportingInitializationContext(java.lang.String id, java.lang.String name, SchedulingStrategy schedulingStrategy, java.lang.String schedulingPeriod, ComponentLog logger, ControllerServiceProvider serviceProvider, NiFiProperties nifiProperties)
public java.lang.String getIdentifier()
getIdentifier
in interface ReportingInitializationContext
public java.lang.String getName()
getName
in interface ReportingInitializationContext
public long getSchedulingPeriod(java.util.concurrent.TimeUnit timeUnit)
ReportingInitializationContext
TimeUnit
that will
elapsed between the return of one execution of the
ReportingTask
's
onTrigger
method and
the time at which the method is invoked again. This method will return
-1L
if the Scheduling Strategy is not set to
SchedulingStrategy.TIMER_DRIVEN
getSchedulingPeriod
in interface ReportingInitializationContext
timeUnit
- unit of time for schedulingpublic java.lang.String getSchedulingPeriod()
getSchedulingPeriod
in interface ReportingInitializationContext
public SchedulingStrategy getSchedulingStrategy()
getSchedulingStrategy
in interface ReportingInitializationContext
SchedulingStrategy
that is used to trigger the task
to runpublic java.util.Set<java.lang.String> getControllerServiceIdentifiers(java.lang.Class<? extends ControllerService> serviceType)
getControllerServiceIdentifiers
in interface ControllerServiceLookup
serviceType
- type of service to get identifiers forpublic ControllerService getControllerService(java.lang.String identifier)
getControllerService
in interface ControllerServiceLookup
identifier
- of controller servicepublic boolean isControllerServiceEnabled(ControllerService service)
isControllerServiceEnabled
in interface ControllerServiceLookup
service
- service to checktrue
if the given Controller Service is enabled,
false
otherwise. If the given Controller Service is not
known by this ControllerServiceLookup, returns false
public boolean isControllerServiceEnabled(java.lang.String serviceIdentifier)
isControllerServiceEnabled
in interface ControllerServiceLookup
serviceIdentifier
- identifier of service to checktrue
if the Controller Service with the given
identifier is enabled, false
otherwise. If the given
identifier is not known by this ControllerServiceLookup, returns
false
public boolean isControllerServiceEnabling(java.lang.String serviceIdentifier)
isControllerServiceEnabling
in interface ControllerServiceLookup
serviceIdentifier
- identifier of service to checktrue
if the Controller Service with the given
identifier has been enabled but is still in the transitioning state,
otherwise returns false
. If the given identifier is not
known by this ControllerServiceLookup, returns false
public ControllerServiceLookup getControllerServiceLookup()
getControllerServiceLookup
in interface ReportingInitializationContext
ControllerServiceLookup
which can be used to obtain
Controller Servicespublic java.lang.String getControllerServiceName(java.lang.String serviceIdentifier)
getControllerServiceName
in interface ControllerServiceLookup
serviceIdentifier
- identifier to look upnull
public ComponentLog getLogger()
getLogger
in interface ReportingInitializationContext
public java.lang.String getKerberosServicePrincipal()
KerberosContext
getKerberosServicePrincipal
in interface KerberosContext
public java.io.File getKerberosServiceKeytab()
KerberosContext
getKerberosServiceKeytab
in interface KerberosContext
public java.io.File getKerberosConfigurationFile()
KerberosContext
getKerberosConfigurationFile
in interface KerberosContext