protected Serializable resolveTenantIdentifierAtRequest(HttpRequest<Object> request) throws TenantNotFoundException {
        if (request.getHeaders() != null) {
            String tenantId = request.getHeaders().get(headerName);
            if (tenantId == null) {
                throw new TenantNotFoundException("Tenant could not be resolved. Header " + headerName + " value is null");
            }
            return tenantId;
        }
        throw new TenantNotFoundException("Tenant could not be resolved from HTTP Header: " + headerName);
    }
protected Serializable resolveTenantIdentifierAtRequest ( HttpRequest < Object > request ) throws TenantNotFoundException { if ( request . getHeaders ( ) != null ) { String tenantId = request . getHeaders ( ) . get ( headerName ) ; if ( tenantId == null ) { throw new TenantNotFoundException ( "Tenant could not be resolved. Header " + headerName + " value is null" ) ; } return tenantId ; } throw new TenantNotFoundException ( "Tenant could not be resolved from HTTP Header: " + headerName ) ; }
@param request The HTTP request
@return the tenant ID if resolved.
@throws TenantNotFoundException A exception thrown if the tenant could not be resolved.