Thank you for the response.

Where can I make the SSLContextService sslContextService = context
.getProperty(SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.
class); call?

Where do I have access to the context within a ControllerService?

Thanks,

On Mon, Apr 11, 2016 at 10:11 AM, Mark Payne <[email protected]> wrote:

> Vincent,
>
> I moved users@nifi to the BCC and instead am redirecting this to the
> dev@nifi mailing list,
> as this is developer question moreso than a user question.
>
> Certainly, you can reference one controller service from another.
> Generally, controller services
> are referenced by using a PropertyDescriptor that identifies the
> controller service. For example:
>
>     public static final PropertyDescriptor SSL_CONTEXT_SERVICE = new
> PropertyDescriptor.Builder()
>             .name("SSL Context Service")
>             .description("The Controller Service to use in order to
> obtain an SSL Context")
>             .required(false)
>             .identifiesControllerService(SSLContextService.class)
>             .build();
>
> This allows the user to choose the appropriate Controller Service. Node
> the 'identifiesControllerService' call.
> The service itself is then obtained by calling 'asControllerService' on a
> PropertyValue object:
>
> SSLContextService sslContextService = context.getProperty(
> SSL_CONTEXT_SERVICE).asControllerService(SSLContextService.class);
>
> Does this give you what you need?
>
> Thanks
> -Mark
>
>
> On Apr 11, 2016, at 10:04 AM, Vincent Russell <[email protected]>
> wrote:
>
> Is it possible to user one controller service inside of another service?
> Can it be brought in from the ControllerServiceInitializationContext?
>
> If so, how is this done?
>
> Thank you,
> Vincent
>
>
>

Reply via email to