Moving invocation of JMX operations to separate class