public MBeanServerConnection getMBeanServerConnection(Subject delegate) throws IOException
{
if (!connected) throw new IOException("Connection has not been established");
// TODO: here we hardcode the client invocation chain. Maybe worth remove this hardcoding ?
ClientInvoker invoker = new ClientInvoker(connection, notificationHandler, delegate);
MBeanServerConnection unmarshaller = ClientUnmarshaller.newInstance(invoker, defaultClassLoader);
MBeanServerConnection catcher = ClientExceptionCatcher.newInstance(unmarshaller);
return catcher;
}