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 ReportingInitializationContextpublic java.lang.String getName()
getName in interface ReportingInitializationContextpublic long getSchedulingPeriod(java.util.concurrent.TimeUnit timeUnit)
ReportingInitializationContextTimeUnit 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_DRIVENgetSchedulingPeriod in interface ReportingInitializationContexttimeUnit - unit of time for schedulingpublic java.lang.String getSchedulingPeriod()
getSchedulingPeriod in interface ReportingInitializationContextpublic SchedulingStrategy getSchedulingStrategy()
getSchedulingStrategy in interface ReportingInitializationContextSchedulingStrategy 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 ControllerServiceLookupserviceType - type of service to get identifiers forpublic ControllerService getControllerService(java.lang.String identifier)
getControllerService in interface ControllerServiceLookupidentifier - of controller servicepublic boolean isControllerServiceEnabled(ControllerService service)
isControllerServiceEnabled in interface ControllerServiceLookupservice - service to checktrue if the given Controller Service is enabled,
false otherwise. If the given Controller Service is not
known by this ControllerServiceLookup, returns falsepublic boolean isControllerServiceEnabled(java.lang.String serviceIdentifier)
isControllerServiceEnabled in interface ControllerServiceLookupserviceIdentifier - 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
falsepublic boolean isControllerServiceEnabling(java.lang.String serviceIdentifier)
isControllerServiceEnabling in interface ControllerServiceLookupserviceIdentifier - 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 falsepublic ControllerServiceLookup getControllerServiceLookup()
getControllerServiceLookup in interface ReportingInitializationContextControllerServiceLookup which can be used to obtain
Controller Servicespublic java.lang.String getControllerServiceName(java.lang.String serviceIdentifier)
getControllerServiceName in interface ControllerServiceLookupserviceIdentifier - identifier to look upnullpublic ComponentLog getLogger()
getLogger in interface ReportingInitializationContextpublic java.lang.String getKerberosServicePrincipal()
KerberosContextgetKerberosServicePrincipal in interface KerberosContextpublic java.io.File getKerberosServiceKeytab()
KerberosContextgetKerberosServiceKeytab in interface KerberosContextpublic java.io.File getKerberosConfigurationFile()
KerberosContextgetKerberosConfigurationFile in interface KerberosContext