xref: /illumos-gate/usr/src/cmd/pools/poold/com/sun/solaris/service/pools/Property.java (revision 581cede61ac9c14d8d4ea452562a567189eead78)
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  *ident	"%Z%%M%	%I%	%E% SMI"
27  *
28  */
29 
30 package com.sun.solaris.service.pools;
31 
32 /**
33  * The <code>Property</code> interface specifies the contract between
34  * a pools configuration element and it's properties. This interface
35  * must be implemented by all pools configuration elements to ensure that
36  * properties can be manipulated.
37  */
38 
39 public interface Property {
40 	/**
41 	 * Get a property with the supplied name.
42 	 *
43 	 * @param name The name of the property to be retrieved.
44 	 * @throws PoolsExecption If there is an error accessing the property.
45 	 */
46 	public boolean getBoolProperty(String name) throws PoolsException;
47 
48 	/**
49 	 * Get a property with the supplied name.
50 	 *
51 	 * @param name The name of the property to be retrieved.
52 	 * @throws PoolsExecption If there is an error accessing the property.
53 	 */
54 	public double getDoubleProperty(String name) throws PoolsException;
55 
56 	/**
57 	 * Get a property with the supplied name.
58 	 *
59 	 * @param name The name of the property to be retrieved.
60 	 * @throws PoolsExecption If there is an error accessing the property.
61 	 */
62 	public long getLongProperty(String name) throws PoolsException;
63 
64 	/**
65 	 * Get a property with the supplied name.
66 	 *
67 	 * @param name The name of the property to be retrieved.
68 	 * @throws PoolsExecption If there is an error accessing the property.
69 	 */
70 	public String getStringProperty(String name) throws PoolsException;
71 
72 	/**
73 	 * Put the supplied value as a property with the supplied name.
74 	 *
75 	 * @param name The name of the property to be updated.
76 	 * @param value The value of the property to be updated.
77 	 * @throws PoolsExecption If there is an error accessing the property.
78 	 */
79 	public void putProperty(String name, Value value) throws PoolsException;
80 
81 	/**
82 	 * Remove the property with the supplied name.
83 	 *
84 	 * @param name The name of the property to be removed.
85 	 * @throws PoolsExecption If there is an error removing the property.
86 	 */
87 	public void rmProperty(String name) throws PoolsException;
88 }
89