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: * @(#)RegistryImplementor.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi.binding.jms.deploy;
030:
031: import java.util.Collection;
032: import java.util.Iterator;
033: import java.util.Properties;
034:
035: import javax.jbi.JBIException;
036:
037: /**
038: * This interface isolates the registry implementation from its API so that
039: * both of them can vary independently.
040: *
041: * @author Sun Microsystems Inc.
042: */
043: public interface RegistryImplementor {
044: /**
045: * Returns all keys.
046: *
047: * @return iterator to keys.
048: */
049: Iterator getAllKeys();
050:
051: /**
052: * Returns all values.
053: *
054: * @return collection of values.
055: */
056: Collection getAllValues();
057:
058: /**
059: * Returns the value of object.
060: *
061: * @param registryKey reg key.
062: *
063: * @return value.
064: */
065: Object getValue(String registryKey);
066:
067: /**
068: * Clears the registry.
069: */
070: void clearRegistry();
071:
072: /**
073: * Checks if registry contains the key.
074: *
075: * @param registryKey reg key.
076: * @param direction inbound/outbound.
077: *
078: * @return true if key is present.
079: */
080: boolean containsKey(String registryKey);
081:
082: /**
083: * Initialises registry.
084: *
085: * @param props
086: *
087: * @throws JBIException jbi exception.
088: */
089: void init(Properties props) throws JBIException;
090:
091: /**
092: * Adds an entry.
093: *
094: * @param key key.
095: * @param value object to be registered.
096: *
097: * @return key.
098: */
099: String registerKey(String key, Object value);
100:
101: /**
102: * Removes the entry.
103: *
104: * @param registryKey key.
105: */
106: void removeKey(String registryKey);
107:
108: /**
109: * Serializes the registry values.
110: *
111: * @throws JBIException serialization exception.
112: */
113: void serialize() throws JBIException;
114: }
|