1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 * 26 */ 27 28 package com.sun.solaris.service.pools; 29 30 /** 31 * The <code>Property</code> interface specifies the contract between 32 * a pools configuration element and its properties. This interface 33 * must be implemented by all pools configuration elements to ensure that 34 * properties can be manipulated. 35 */ 36 37 public interface Property { 38 /** 39 * Get a property with the supplied name. 40 * 41 * @param name The name of the property to be retrieved. 42 * @throws PoolsException If there is an error accessing the property. 43 */ 44 public boolean getBoolProperty(String name) throws PoolsException; 45 46 /** 47 * Get a property with the supplied name. 48 * 49 * @param name The name of the property to be retrieved. 50 * @throws PoolsException If there is an error accessing the property. 51 */ 52 public double getDoubleProperty(String name) throws PoolsException; 53 54 /** 55 * Get a property with the supplied name. 56 * 57 * @param name The name of the property to be retrieved. 58 * @throws PoolsException If there is an error accessing the property. 59 */ 60 public long getLongProperty(String name) throws PoolsException; 61 62 /** 63 * Get a property with the supplied name. 64 * 65 * @param name The name of the property to be retrieved. 66 * @throws PoolsException If there is an error accessing the property. 67 */ 68 public String getStringProperty(String name) throws PoolsException; 69 70 /** 71 * Put the supplied value as a property with the supplied name. 72 * 73 * @param name The name of the property to be updated. 74 * @param value The value of the property to be updated. 75 * @throws PoolsException If there is an error accessing the property. 76 */ 77 public void putProperty(String name, Value value) throws PoolsException; 78 79 /** 80 * Remove the property with the supplied name. 81 * 82 * @param name The name of the property to be removed. 83 * @throws PoolsException If there is an error removing the property. 84 */ 85 public void rmProperty(String name) throws PoolsException; 86 } 87