1. /*
  2. * @(#)LongMonitoredAttributeBase.java 1.3 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.corba.se.spi.monitoring;
  8. import java.util.*;
  9. /**
  10. * <p>
  11. *
  12. * @author Hemanth Puttaswamy
  13. * </p>
  14. * <p>
  15. * A Cleaner Abstraction to provide a Monitored Attribute of type 'Long'
  16. * </p>
  17. */
  18. public abstract class LongMonitoredAttributeBase extends MonitoredAttributeBase {
  19. ///////////////////////////////////////
  20. // operations
  21. /**
  22. * <p>
  23. * Constructs LongMonitoredAttribute, by creating the
  24. * MonitoredAttributeInfo with 'Long' as the class type.
  25. * Users are expected to extend this class and provide the implementation
  26. * for getValue() and if needed clearState() as well.
  27. * </p>
  28. * <p>
  29. *
  30. * @param name of tthe MonitoredAttribute
  31. * </p>
  32. * <p>
  33. * @param description of the Attribute, Please provid a well thought out
  34. * description, so that the admin can make sense of the attribute supplied.
  35. * </p>
  36. */
  37. public LongMonitoredAttributeBase(String name, String description) {
  38. super( name );
  39. MonitoredAttributeInfoFactory f =
  40. MonitoringFactories.getMonitoredAttributeInfoFactory();
  41. MonitoredAttributeInfo maInfo = f.createMonitoredAttributeInfo(
  42. description, Long.class, false, false );
  43. this.setMonitoredAttributeInfo( maInfo );
  44. } // end LongMonitoredAttributeBase
  45. } // end LongMonitoredAttributeBase