1. /*
  2. * @(#)MonitoringFactories.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 com.sun.corba.se.impl.monitoring.MonitoredObjectFactoryImpl;
  9. import com.sun.corba.se.impl.monitoring.MonitoredAttributeInfoFactoryImpl;
  10. import com.sun.corba.se.impl.monitoring.MonitoringManagerFactoryImpl;
  11. /**
  12. * <p>
  13. *
  14. * @author Hemanth Puttaswamy
  15. * </p>
  16. * <p>
  17. * This is used for getting the default factories for
  18. * MonitoredObject, MonitoredAttributeInfo and MonitoringManager. We do not
  19. * expect users to use the MonitoredAttributeInfo factory most of the time
  20. * because the Info is automatically built by StringMonitoredAttributeBase
  21. * and LongMonitoredAttributeBase.
  22. * </p>
  23. */
  24. public class MonitoringFactories {
  25. ///////////////////////////////////////
  26. // attributes
  27. private static final MonitoredObjectFactoryImpl monitoredObjectFactory =
  28. new MonitoredObjectFactoryImpl( );
  29. private static final MonitoredAttributeInfoFactoryImpl
  30. monitoredAttributeInfoFactory =
  31. new MonitoredAttributeInfoFactoryImpl( );
  32. private static final MonitoringManagerFactoryImpl monitoringManagerFactory =
  33. new MonitoringManagerFactoryImpl( );
  34. ///////////////////////////////////////
  35. // operations
  36. /**
  37. * <p>
  38. * Gets the MonitoredObjectFactory
  39. * </p>
  40. * <p>
  41. *
  42. * @return a MonitoredObjectFactory
  43. * </p>
  44. */
  45. public static MonitoredObjectFactory getMonitoredObjectFactory( ) {
  46. return monitoredObjectFactory;
  47. }
  48. /**
  49. * <p>
  50. * Gets the MonitoredAttributeInfoFactory. The user is not expected to use this
  51. * Factory, since the MonitoredAttributeInfo is internally created by
  52. * StringMonitoredAttributeBase, LongMonitoredAttributeBase and
  53. * StatisticMonitoredAttribute. If User wants to create a MonitoredAttribute
  54. * of some other special type like a DoubleMonitoredAttribute, they can
  55. * build a DoubleMonitoredAttributeBase like LongMonitoredAttributeBase
  56. * and build a MonitoredAttributeInfo required by MonitoredAttributeBase
  57. * internally by using this Factory.
  58. * </p>
  59. * <p>
  60. *
  61. * @return a MonitoredAttributeInfoFactory
  62. * </p>
  63. */
  64. public static MonitoredAttributeInfoFactory
  65. getMonitoredAttributeInfoFactory( )
  66. {
  67. return monitoredAttributeInfoFactory;
  68. }
  69. /**
  70. * <p>
  71. * Gets the MonitoredManagerFactory. The user is not expected to use this
  72. * Factory, since the ORB will be automatically initialized with the
  73. * MonitoringManager.
  74. *
  75. * User can get hold of MonitoringManager associated with ORB by calling
  76. * orb.getMonitoringManager( )
  77. * </p>
  78. * <p>
  79. *
  80. * @return a MonitoredManagerFactory
  81. * </p>
  82. */
  83. public static MonitoringManagerFactory getMonitoringManagerFactory( ) {
  84. return monitoringManagerFactory;
  85. }
  86. }