protected MessageContext getEncoderMessageContext(final RequestAbstractType request, final T samlObject, final String relayState) {
        val ctx = new MessageContext<SAMLObject>();
        ctx.setMessage(samlObject);
        SAMLBindingSupport.setRelayState(ctx, relayState);
        SamlIdPUtils.preparePeerEntitySamlEndpointContext(request, ctx, adaptor, getBinding());
        val self = ctx.getSubcontext(SAMLSelfEntityContext.class, true);
        self.setEntityId(SamlIdPUtils.getIssuerFromSamlObject(samlObject));
        return ctx;
    }
protected MessageContext getEncoderMessageContext ( final RequestAbstractType request , final T samlObject , final String relayState ) { val ctx = new MessageContext < SAMLObject > ( ) ; ctx . setMessage ( samlObject ) ; SAMLBindingSupport . setRelayState ( ctx , relayState ) ; SamlIdPUtils . preparePeerEntitySamlEndpointContext ( request , ctx , adaptor , getBinding ( ) ) ; val self = ctx . getSubcontext ( SAMLSelfEntityContext . class , true ) ; self . setEntityId ( SamlIdPUtils . getIssuerFromSamlObject ( samlObject ) ) ; return ctx ; }
Build encoder message context.

@param request    the authn request
@param samlObject the saml response
@param relayState the relay state
@return the message context