public void registration(MBeanMetaData metadata, int operation) throws MBeanRegistrationException
{
if (!(metadata.mbean instanceof MBeanRegistration)) return;
MBeanRegistration registrable = (MBeanRegistration)metadata.mbean;
try
{
switch (operation)
{
case PRE_REGISTER:
ObjectName objName = registrable.preRegister(outerServer, metadata.name);
metadata.name = objName;
break;
case POST_REGISTER_TRUE:
registrable.postRegister(Boolean.TRUE);
break;
case POST_REGISTER_FALSE:
registrable.postRegister(Boolean.FALSE);
break;
case PRE_DEREGISTER:
registrable.preDeregister();
break;
case POST_DEREGISTER:
registrable.postDeregister();
break;
default:
throw new ImplementationException();
}
}