Allow middleware components to distinguish different handler types.