MonitoringFactories.java revision 608:7e06bf1dcb09
167276Sjon/* 267276Sjon * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. 367276Sjon * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 467276Sjon * 567276Sjon * This code is free software; you can redistribute it and/or modify it 667276Sjon * under the terms of the GNU General Public License version 2 only, as 767276Sjon * published by the Free Software Foundation. Oracle designates this 867276Sjon * particular file as subject to the "Classpath" exception as provided 967276Sjon * by Oracle in the LICENSE file that accompanied this code. 1067276Sjon * 1167276Sjon * This code is distributed in the hope that it will be useful, but WITHOUT 1267276Sjon * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1367276Sjon * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1467276Sjon * version 2 for more details (a copy is included in the LICENSE file that 1567276Sjon * accompanied this code). 1667276Sjon * 1767276Sjon * You should have received a copy of the GNU General Public License version 1867276Sjon * 2 along with this work; if not, write to the Free Software Foundation, 1967276Sjon * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2067276Sjon * 2167276Sjon * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2267276Sjon * or visit www.oracle.com if you need additional information or have any 2367276Sjon * questions. 2467276Sjon */ 2567276Sjonpackage com.sun.corba.se.spi.monitoring; 2667276Sjon 2767276Sjonimport com.sun.corba.se.impl.monitoring.MonitoredObjectFactoryImpl; 2867276Sjonimport com.sun.corba.se.impl.monitoring.MonitoredAttributeInfoFactoryImpl; 2967276Sjonimport com.sun.corba.se.impl.monitoring.MonitoringManagerFactoryImpl; 3067276Sjon 3167276Sjon/** 3267276Sjon * <p> 3367276Sjon * 3467276Sjon * @author Hemanth Puttaswamy 3567276Sjon * </p> 3667276Sjon * <p> 3767276Sjon * This is used for getting the default factories for 3867276Sjon * MonitoredObject, MonitoredAttributeInfo and MonitoringManager. We do not 3967276Sjon * expect users to use the MonitoredAttributeInfo factory most of the time 4067276Sjon * because the Info is automatically built by StringMonitoredAttributeBase 4167276Sjon * and LongMonitoredAttributeBase. 4267276Sjon * </p> 4367276Sjon */ 4467276Sjonpublic class MonitoringFactories { 4567276Sjon /////////////////////////////////////// 4667276Sjon // attributes 4767276Sjon private static final MonitoredObjectFactoryImpl monitoredObjectFactory = 4867276Sjon new MonitoredObjectFactoryImpl( ); 4967276Sjon private static final MonitoredAttributeInfoFactoryImpl 5067276Sjon monitoredAttributeInfoFactory = 5167276Sjon new MonitoredAttributeInfoFactoryImpl( ); 5267276Sjon private static final MonitoringManagerFactoryImpl monitoringManagerFactory = 5367276Sjon new MonitoringManagerFactoryImpl( ); 5467276Sjon 5567276Sjon 5667276Sjon /////////////////////////////////////// 5767276Sjon // operations 5867276Sjon 5967276Sjon/** 6067276Sjon * <p> 6167276Sjon * Gets the MonitoredObjectFactory 6267276Sjon * </p> 6367276Sjon * <p> 6467276Sjon * 6567276Sjon * @return a MonitoredObjectFactory 6667276Sjon * </p> 6767276Sjon */ 6867276Sjon public static MonitoredObjectFactory getMonitoredObjectFactory( ) { 6967276Sjon return monitoredObjectFactory; 7067276Sjon } 7167276Sjon 7267276Sjon/** 7367276Sjon * <p> 7467276Sjon * Gets the MonitoredAttributeInfoFactory. The user is not expected to use this 7567276Sjon * Factory, since the MonitoredAttributeInfo is internally created by 7667276Sjon * StringMonitoredAttributeBase, LongMonitoredAttributeBase and 7767276Sjon * StatisticMonitoredAttribute. If User wants to create a MonitoredAttribute 7867276Sjon * of some other special type like a DoubleMonitoredAttribute, they can 7967276Sjon * build a DoubleMonitoredAttributeBase like LongMonitoredAttributeBase 8067276Sjon * and build a MonitoredAttributeInfo required by MonitoredAttributeBase 8167276Sjon * internally by using this Factory. 8267276Sjon * </p> 8367276Sjon * <p> 8467276Sjon * 8567276Sjon * @return a MonitoredAttributeInfoFactory 8667276Sjon * </p> 8767276Sjon */ 8867276Sjon public static MonitoredAttributeInfoFactory 8967276Sjon getMonitoredAttributeInfoFactory( ) 9067276Sjon { 9167276Sjon return monitoredAttributeInfoFactory; 9267276Sjon } 9367276Sjon 9467276Sjon/** 9567276Sjon * <p> 9667276Sjon * Gets the MonitoredManagerFactory. The user is not expected to use this 9767276Sjon * Factory, since the ORB will be automatically initialized with the 9867276Sjon * MonitoringManager. 9967276Sjon * 10067276Sjon * User can get hold of MonitoringManager associated with ORB by calling 10167276Sjon * orb.getMonitoringManager( ) 10267276Sjon * </p> 10367276Sjon * <p> 10467276Sjon * 10567276Sjon * @return a MonitoredManagerFactory 10667276Sjon * </p> 10767276Sjon */ 10867276Sjon public static MonitoringManagerFactory getMonitoringManagerFactory( ) { 10967276Sjon return monitoringManagerFactory; 11067276Sjon } 11167276Sjon} 11267276Sjon