use of org.apache.qpid.proton.engine.Record in project hono by eclipse.
the class Constants method setClientPrincipal.
/**
* Gets the principal representing a connection's client.
*
* @param con The connection to get the principal for.
* @param principal The principal representing the authenticated client.
* @throws NullPointerException if any of the parameters is {@code null}.
*/
public static void setClientPrincipal(final ProtonConnection con, final HonoUser principal) {
Objects.requireNonNull(principal);
Record attachments = Objects.requireNonNull(con).attachments();
attachments.set(KEY_CLIENT_PRINCIPAL, HonoUser.class, principal);
}
Aggregations