站内搜索: 请输入搜索关键词
当前页面: 图书首页 > Java and JMX Building Manageable Systems

Java and JMX Building Manageable Systems

[ directory ] Previous Section Next Section

3.3 Design Guidelines

MBeans are Java classes, so all the normal rules of good class design apply directly to their design. There are, however, a few special considerations to keep in mind when you're designing MBeans to represent resources:

  • Keep the management interfaces for similar resources similar. Creating radically different interfaces for resources that aren't that different will make achieving consistency in your management applications difficult.

  • Remember that your resource's management interface will be exposed to management applications. Making application functionality梖or example, the release() and reserve() methods of the "Quick Tour's" SessionPool?/TT>part of the management interface will at best confuse administrators and at worst make your resource unstable.

  • Keep the attribute types and operation parameters simple. Administrators may be accessing your MBean via a GUI where it isn't feasible to input complex objects.

    [ directory ] Previous Section Next Section