Topic for tomorrow: message types in ProfileRequestContext
Cantor, Scott
cantor.2 at osu.edu
Thu Feb 6 16:37:34 EST 2014
Something I know is an issue right now, which Brent mentioned in a thread
a week or so back, a lot of the actions Chad did or stubbed out use less
generic versions of ProfileRequestContext like <AuthnRequest, Object> or
<Object, Response> to constrain the message type of one half or the other.
I think we probably do not want this, or at least not implemented this
way. One consequence of doing it is that the strategy functions for
accessing messages has to be implemented using the types on the Function<>
signature, and this works by propagating that typing through to the
MessageContext, and so the effect is that if the message type is off,
you'll get a ClassCastException, not a controllable error check or null.
In some cases, you could say it's a non-issue because of our flow design,
but if we write actions that are meant to be truly unaware of where the
message lives or even the message type, you can't do it this way.
So I'm wondering if we want to not do this, and moreover recode the
MessageContext accessor Functions (Inbound/OutboundMessageStrategy) to be
type-safe and do the check for us, returning a null.
-- Scott
More information about the dev
mailing list