001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)Registry.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: /**
030: * Registry.java
031: *
032: * SUN PROPRIETARY/CONFIDENTIAL.
033: * This software is the proprietary information of Sun Microsystems, Inc.
034: * Use is subject to license terms.
035: *
036: * Created on July 20, 2005, 3:25 PM
037: */package com.sun.jbi.management.registry;
038:
039: import com.sun.jbi.ComponentQuery;
040: import com.sun.jbi.ServiceAssemblyQuery;
041:
042: import java.io.ByteArrayInputStream;
043:
044: /**
045: *
046: * @author Sun Microsystems, Inc.
047: */
048: public interface Registry extends com.sun.jbi.registry.Registry {
049: public static final String REGISTRY_FOLDER_PROPERTY = "com.sun.jbi.registry.folder";
050: public static final String REGISTRY_FILE_PROPERTY = "com.sun.jbi.registry.file";
051: public static final String REGISTRY_SYNC_FILE_PROPERTY = "com.sun.jbi.registry.syncfile";
052: public static final String REGISTRY_READONLY_PROPERTY = "com.sun.jbi.registry.readonly";
053: public static final String REGISTRY_LOCK_INTERVAL_PROPERTY = "com.sun.jbi.registry.lock.interval";
054:
055: public static final String CONFIG_SUFFIX = "-config";
056: public static final String APP_CONFIG_NAME_KEY = "configurationName";
057:
058: /**
059: * Get the Updater instance to be used for updating the Registry.
060: *
061: * @return an instance of the Updater to be used to manipulate
062: * ( create / delete / modify ) contents of the registry.
063: * @throws RegistryException if problems are encountered in creating
064: * a Updater.
065: */
066: Updater getUpdater() throws RegistryException;
067:
068: /**
069: * Get a Generic Query Instance
070: * @return an instance of GenericQuery.
071: * @throws RegistryException on errors.
072: */
073: GenericQuery getGenericQuery() throws RegistryException;
074:
075: /**
076: * Get a ComponentQuery instance for a given target
077: *
078: * @param targetName - name identifying the target.
079: * @return an instance of ComponentQuery.
080: * @throws RegistryException on errors.
081: */
082: ComponentQuery getComponentQuery(String targetName)
083: throws RegistryException;
084:
085: /**
086: * Get the ComponentQuery specific to the target of the instance.
087: * @return an instance of ComponentQuery.
088: * @throws RegistryException on errors.
089: */
090: ComponentQuery getComponentQuery() throws RegistryException;
091:
092: /**
093: * Get a ServiceAssemblyQuery instance for a given target
094: *
095: * @param targetName - name identifying the target.
096: * @return an instance of ServiceAssemblyQuery.
097: * @throws RegistryException on errors.
098: */
099: ServiceAssemblyQuery getServiceAssemblyQuery(String targetName)
100: throws RegistryException;
101:
102: /**
103: * Get the ServiceAssemblyQuery specific to the target of the instance.
104: * @return an instance of ServiceAssemblyQuery.
105: * @throws RegistryException on errors.
106: */
107: ServiceAssemblyQuery getServiceAssemblyQuery()
108: throws RegistryException;
109:
110: /**
111: * destroy the single instance.
112: */
113: void destroy();
114:
115: /**
116: * Get the Registry Specification.
117: */
118: public RegistrySpec getRegistrySpec();
119:
120: /**
121: * Get the Repository the registry instance uses.
122: */
123: public com.sun.jbi.management.repository.Repository getRepository();
124:
125: /**
126: * Get a registry property.
127: */
128: public String getProperty(String propName);
129:
130: /**
131: * Commit the changes to the registry.
132: */
133: public void commit() throws RegistryException;
134:
135: /**
136: * Take a snapshot of the Registry.
137: */
138: public ByteArrayInputStream snapshot() throws RegistryException;
139: }
|