jsr375-experts@javaee-security-spec.java.net

[jsr375-experts] JDK 8 friendly APIs

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Mon, 19 Oct 2015 23:44:17 +0200

Hi,

Since Java EE 8 targets Java SE 8, maybe it's an idea to see if we can add
some API patterns that are particularly friendly to JDK 8 style
(functional) programming.

E.g. adding some methods to CredentialValidationResult that take lambdas,
you could do something like:

cdi.select(IdentityStore.class).get()
   .validate(credential)
   .ifValid(e -> callbacks.cpc(e.getCallerName())
   .elseThrow();

The above is just a quick example, but it may be worth looking into.

Kind regards,
Arjan Tijms