The nature of dark energy affects the Hubble expansion rate ( namely , the expansion history ) H ( z ) by an integral over w ( z ) . However , the usual observables are the luminosity distances or the angular diameter distances , which measure the distance-redshift relation . Actually , the property of dark energy affects the distances ( and the growth factor ) by a further integration over functions of H ( z ) . Thus the direct measurements of the Hubble parameter H ( z ) at different redshifts are of great importance for constraining the properties of dark energy . In this paper , we show how the typical dark energy models , for example , the \Lambda CDM , w CDM , CPL , and holographic dark energy models , can be constrained by the current direct measurements of H ( z ) ( 31 data used in total in this paper , covering the redshift range of z \in [ 0.07 , 2.34 ] ) . In fact , the future redshift-drift observations ( also referred to as the Sandage-Loeb test ) can also directly measure H ( z ) at higher redshifts , covering the range of z \in [ 2 , 5 ] . We thus discuss what role the redshift-drift observations can play in constraining dark energy with the Hubble parameter measurements . We show that the constraints on dark energy can be improved greatly with the H ( z ) data from only a 10-year observation of redshift drift .