public boolean visitEnter( Object visited )
throws Exception
{
if( visited instanceof LayerDescriptor )
{
LayerDescriptor layerDescriptor = (LayerDescriptor) visited;
layer = application.findLayer( layerDescriptor.name() );
LayerBean layerBean = new LayerBean( layer, layerDescriptor );
ObjectName objectName = new ObjectName( "Qi4j:application=" + application.name() + ",layer=" + layer
.name() );
names.push( objectName );
RequiredModelMBean mbean = new ModelMBeanBuilder( objectName, layerDescriptor.name(), LayerBean.class
.getName() ).
attribute( "uses", "Layer usages", String.class.getName(), "Other layers that this layer uses", "getUses", null )
.
operation( "restart", "Restart layer", String.class.getName(), MBeanOperationInfo.ACTION_INFO )
.