01: /******************************************************************************
02: * JBoss, a division of Red Hat *
03: * Copyright 2006, Red Hat Middleware, LLC, and individual *
04: * contributors as indicated by the @authors tag. See the *
05: * copyright.txt in the distribution for a full listing of *
06: * individual contributors. *
07: * *
08: * This is free software; you can redistribute it and/or modify it *
09: * under the terms of the GNU Lesser General Public License as *
10: * published by the Free Software Foundation; either version 2.1 of *
11: * the License, or (at your option) any later version. *
12: * *
13: * This software is distributed in the hope that it will be useful, *
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16: * Lesser General Public License for more details. *
17: * *
18: * You should have received a copy of the GNU Lesser General Public *
19: * License along with this software; if not, write to the Free *
20: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
21: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
22: ******************************************************************************/package org.jboss.portal.registration;
23:
24: import java.util.Collection;
25: import java.util.Map;
26:
27: /**
28: * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
29: * @version $Revision: 8966 $
30: * @since 2.6
31: */
32: public interface RegistrationManager extends
33: RegistrationPropertyChangeListener,
34: RegistrationPolicyChangeListener {
35: RegistrationPolicy getPolicy();
36:
37: void setPolicy(RegistrationPolicy policy);
38:
39: RegistrationPersistenceManager getPersistenceManager();
40:
41: void setPersistenceManager(
42: RegistrationPersistenceManager persistenceManager);
43:
44: Registration addRegistrationTo(String consumerName,
45: Map registrationProperties, boolean createConsumerIfNeeded)
46: throws RegistrationException;
47:
48: Consumer createConsumer(String name) throws RegistrationException,
49: InvalidConsumerDataException;
50:
51: Consumer addConsumerToGroupNamed(String consumerName,
52: String groupName, boolean createGroupIfNeeded,
53: boolean createConsumerIfNeeded)
54: throws RegistrationException;
55:
56: ConsumerGroup createConsumerGroup(String groupName)
57: throws RegistrationException;
58:
59: void removeConsumer(String identity) throws RegistrationException,
60: NoSuchRegistrationException;
61:
62: void removeConsumer(Consumer consumer)
63: throws RegistrationException, NoSuchRegistrationException;
64:
65: Consumer getConsumerByIdentity(String identity)
66: throws RegistrationException;
67:
68: Consumer getConsumerFor(String registrationHandle)
69: throws RegistrationException;
70:
71: Registration getRegistration(String registrationHandle)
72: throws RegistrationException;
73:
74: void removeRegistration(String registrationHandle)
75: throws RegistrationException, NoSuchRegistrationException;
76:
77: void removeRegistration(Registration registration)
78: throws RegistrationException, NoSuchRegistrationException;
79:
80: ConsumerGroup getConsumerGroup(String groupName)
81: throws RegistrationException;
82:
83: Collection getConsumerGroups() throws RegistrationException;
84:
85: void removeConsumerGroup(ConsumerGroup group)
86: throws RegistrationException;
87:
88: void removeConsumerGroup(String name) throws RegistrationException;
89:
90: Collection getConsumers() throws RegistrationException;
91:
92: void clear() throws RegistrationException;
93: }
|