Modified the class type used for fetch the context, which will have the
close context method.

Signed-off-by: madhusmitap <madhusmitap@madhusmitap7>