refact HAClient with InvocationHandler