Author: chris.laprun(a)jboss.com
Date: 2009-11-30 13:59:03 -0500 (Mon, 30 Nov 2009)
New Revision: 873
Added:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/AbstractRegistrationPersistenceManager.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerGroupSPI.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerSPI.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/RegistrationSPI.java
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerImpl.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationPersistenceManagerImpl.java
Log:
- Introduced SPI classes to be able to extract an abstract RegistrationPersistenceManager
that can be reused.
- Made ConsumerImpl, RegistrationImpl and ConsumerGroupImpl implement respective SPI
interfaces.
Added:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/AbstractRegistrationPersistenceManager.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/AbstractRegistrationPersistenceManager.java
(rev 0)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/AbstractRegistrationPersistenceManager.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -0,0 +1,162 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.gatein.registration;
+
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.registration.spi.ConsumerGroupSPI;
+import org.gatein.registration.spi.ConsumerSPI;
+import org.gatein.registration.spi.RegistrationSPI;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public abstract class AbstractRegistrationPersistenceManager implements
RegistrationPersistenceManager
+{
+ public Consumer createConsumer(String consumerId, String consumerName) throws
RegistrationException
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName,
"Consumer name", null);
+
+ ConsumerSPI consumer = internalCreateConsumer(consumerId, consumerName);
+ consumer.setStatus(RegistrationStatus.PENDING);
+ internalAddConsumer(consumer);
+
+ return consumer;
+ }
+
+ public ConsumerGroup createConsumerGroup(String name) throws RegistrationException
+ {
+ ConsumerGroup group = getConsumerGroup(name);
+ if (group != null)
+ {
+ throw new DuplicateRegistrationException("A ConsumerGroup named '"
+ name + "' has already been registered.");
+ }
+ else
+ {
+ group = internalCreateConsumerGroup(name);
+ internalAddConsumerGroup((ConsumerGroupSPI)group);
+ return group;
+ }
+ }
+
+ public void removeConsumerGroup(String name) throws RegistrationException
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(name, "ConsumerGroup
name", null);
+ if (internalRemoveConsumerGroup(name) == null)
+ {
+ throw new NoSuchRegistrationException("There is no ConsumerGroup named
'" + name + "'.");
+ }
+ }
+
+ public void removeConsumer(String consumerId) throws RegistrationException
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
+ if (internalRemoveConsumer(consumerId) == null)
+ {
+ throw new RegistrationException("There is no Consumer with identity
'" + consumerId + "'.");
+ }
+ }
+
+ public void removeRegistration(String registrationId) throws RegistrationException
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(registrationId,
"Registration identity", null);
+
+ RegistrationSPI registration = internalRemoveRegistration(registrationId);
+ if (registration == null)
+ {
+ throw new NoSuchRegistrationException("There is no Registration with id
'" + registrationId + "'");
+ }
+
+ ConsumerSPI consumer = registration.getConsumer();
+ consumer.removeRegistration(registration);
+ }
+
+ public Registration addRegistrationFor(String consumerId, Map registrationProperties)
throws RegistrationException
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
+ ParameterValidation.throwIllegalArgExceptionIfNull(registrationProperties,
"Registration properties");
+
+ ConsumerSPI consumer = getConsumerSPIById(consumerId);
+ if (consumer == null)
+ {
+ throw new NoSuchRegistrationException("There is no Consumer with identity
'" + consumerId
+ + "' to add a Registration to...");
+ }
+
+ RegistrationSPI registration = internalCreateRegistration(consumer,
registrationProperties);
+ consumer.addRegistration(registration);
+
+ internalAddRegistration(registration);
+
+ return registration;
+ }
+
+ public Consumer addConsumerToGroupNamed(String consumerId, String groupName) throws
RegistrationException
+ {
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(groupName,
"ConsumerGroup name", null);
+
+ ConsumerGroup group = getConsumerGroup(groupName);
+ if (group == null)
+ {
+ throw new NoSuchRegistrationException("There is no ConsumerGroup named
'" + groupName
+ + "' to add a Consumer to...");
+ }
+
+ ConsumerSPI consumer = getConsumerSPIById(consumerId);
+ if (consumer == null)
+ {
+ throw new NoSuchRegistrationException("There is no Consumer with identity
'" + consumerId
+ + "' to add to ConsumerGroup named '" + groupName +
"'. Did you create it?");
+ }
+
+ group.addConsumer(consumer);
+
+ return consumer;
+ }
+
+ // internal methods: extension points for subclasses
+
+ protected abstract void internalAddRegistration(RegistrationSPI registration);
+
+ protected abstract RegistrationSPI internalRemoveRegistration(String registrationId);
+
+ protected abstract RegistrationSPI internalCreateRegistration(ConsumerSPI consumer,
Map registrationProperties);
+
+ protected abstract void internalAddConsumer(ConsumerSPI consumer);
+
+ protected abstract ConsumerSPI internalRemoveConsumer(String consumerId);
+
+ protected abstract ConsumerSPI internalCreateConsumer(String consumerId, String
consumerName);
+
+ protected abstract void internalAddConsumerGroup(ConsumerGroupSPI group);
+
+ protected abstract ConsumerGroupSPI internalRemoveConsumerGroup(String name);
+
+ protected abstract ConsumerGroupSPI internalCreateConsumerGroup(String name);
+
+ protected abstract ConsumerSPI getConsumerSPIById(String consumerId) throws
RegistrationException;
+}
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java 2009-11-30
17:02:54 UTC (rev 872)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerGroupImpl.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -24,10 +24,10 @@
import org.gatein.common.util.ParameterValidation;
import org.gatein.registration.Consumer;
-import org.gatein.registration.ConsumerGroup;
import org.gatein.registration.NoSuchRegistrationException;
import org.gatein.registration.RegistrationException;
import org.gatein.registration.RegistrationStatus;
+import org.gatein.registration.spi.ConsumerGroupSPI;
import java.util.Collection;
import java.util.Collections;
@@ -38,7 +38,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision:5672 $
*/
-public class ConsumerGroupImpl implements ConsumerGroup
+public class ConsumerGroupImpl implements ConsumerGroupSPI
{
private String name;
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerImpl.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerImpl.java 2009-11-30
17:02:54 UTC (rev 872)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/ConsumerImpl.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -24,13 +24,14 @@
package org.gatein.registration.impl;
import org.gatein.common.util.ParameterValidation;
-import org.gatein.registration.Consumer;
import org.gatein.registration.ConsumerCapabilities;
import org.gatein.registration.ConsumerGroup;
import org.gatein.registration.Registration;
import org.gatein.registration.RegistrationException;
import org.gatein.registration.RegistrationStatus;
import org.gatein.registration.RegistrationUtils;
+import org.gatein.registration.spi.ConsumerSPI;
+import org.gatein.registration.spi.RegistrationSPI;
import java.util.Collection;
import java.util.Collections;
@@ -42,7 +43,7 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class ConsumerImpl implements Consumer
+public class ConsumerImpl implements ConsumerSPI
{
private String name;
@@ -154,14 +155,14 @@
return group;
}
- void addRegistration(Registration registration)
+ public void addRegistration(RegistrationSPI registration)
{
ParameterValidation.throwIllegalArgExceptionIfNull(registration,
"Registration");
registrations.add(registration);
}
- void removeRegistration(Registration registration) throws RegistrationException
+ public void removeRegistration(RegistrationSPI registration) throws
RegistrationException
{
ParameterValidation.throwIllegalArgExceptionIfNull(registration,
"Registration");
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java 2009-11-30
17:02:54 UTC (rev 872)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationImpl.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -24,9 +24,10 @@
package org.gatein.registration.impl;
import org.gatein.common.util.ParameterValidation;
-import org.gatein.registration.Consumer;
import org.gatein.registration.Registration;
import org.gatein.registration.RegistrationStatus;
+import org.gatein.registration.spi.ConsumerSPI;
+import org.gatein.registration.spi.RegistrationSPI;
import javax.xml.namespace.QName;
import java.util.Collections;
@@ -38,17 +39,17 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class RegistrationImpl implements Registration
+public class RegistrationImpl implements RegistrationSPI
{
private final String id;
- private ConsumerImpl consumer;
+ private ConsumerSPI consumer;
private RegistrationStatus status;
private Map<QName, Object> properties;
private String registrationHandle;
- public RegistrationImpl(String id, ConsumerImpl consumer, RegistrationStatus status,
Map properties)
+ public RegistrationImpl(String id, ConsumerSPI consumer, RegistrationStatus status,
Map properties)
{
this.id = id;
this.consumer = consumer;
@@ -71,7 +72,7 @@
return registrationHandle;
}
- public Consumer getConsumer()
+ public ConsumerSPI getConsumer()
{
return consumer;
}
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationPersistenceManagerImpl.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationPersistenceManagerImpl.java 2009-11-30
17:02:54 UTC (rev 872)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/impl/RegistrationPersistenceManagerImpl.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -24,14 +24,15 @@
package org.gatein.registration.impl;
import org.gatein.common.util.ParameterValidation;
+import org.gatein.registration.AbstractRegistrationPersistenceManager;
import org.gatein.registration.Consumer;
import org.gatein.registration.ConsumerGroup;
-import org.gatein.registration.DuplicateRegistrationException;
-import org.gatein.registration.NoSuchRegistrationException;
import org.gatein.registration.Registration;
import org.gatein.registration.RegistrationException;
-import org.gatein.registration.RegistrationPersistenceManager;
import org.gatein.registration.RegistrationStatus;
+import org.gatein.registration.spi.ConsumerGroupSPI;
+import org.gatein.registration.spi.ConsumerSPI;
+import org.gatein.registration.spi.RegistrationSPI;
import java.util.Collection;
import java.util.Collections;
@@ -43,77 +44,40 @@
* @version $Revision: 8784 $
* @since 2.6
*/
-public class RegistrationPersistenceManagerImpl implements
RegistrationPersistenceManager
+public class RegistrationPersistenceManagerImpl extends
AbstractRegistrationPersistenceManager
{
private long lastRegistrationId;
- private Map<String, Consumer> consumers = new HashMap<String,
Consumer>();
- private Map<String, ConsumerGroup> groups = new HashMap<String,
ConsumerGroup>();
- private Map<String, Registration> registrations = new HashMap<String,
Registration>();
+ private Map<String, ConsumerSPI> consumers = new HashMap<String,
ConsumerSPI>();
+ private Map<String, ConsumerGroupSPI> groups = new HashMap<String,
ConsumerGroupSPI>();
+ private Map<String, RegistrationSPI> registrations = new HashMap<String,
RegistrationSPI>();
- public Consumer createConsumer(String consumerId, String consumerName) throws
RegistrationException
+ public Collection<? extends Consumer> getConsumers()
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerName,
"Consumer name", null);
-
- ConsumerImpl consumer = new ConsumerImpl(consumerId, consumerName);
- consumer.setStatus(RegistrationStatus.PENDING);
- internalAddConsumer(consumer);
-
- return consumer;
+ return Collections.unmodifiableCollection(consumers.values());
}
- public ConsumerGroup getConsumerGroup(String name) throws RegistrationException
+ public Collection<? extends Registration> getRegistrations()
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(name, "ConsumerGroup
name", null);
-
- return groups.get(name);
+ return Collections.unmodifiableCollection(registrations.values());
}
- public ConsumerGroup createConsumerGroup(String name) throws RegistrationException
+ public Collection<? extends ConsumerGroup> getConsumerGroups()
{
- ConsumerGroup group = getConsumerGroup(name);
- if (group != null)
- {
- throw new DuplicateRegistrationException("A ConsumerGroup named '"
+ name + "' has already been registered.");
- }
- else
- {
- group = new ConsumerGroupImpl(name);
- internalAddConsumerGroup(group);
- return group;
- }
+ return Collections.unmodifiableCollection(groups.values());
}
- public void removeConsumerGroup(String name) throws RegistrationException
+ public Registration getRegistration(String registrationId)
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(name, "ConsumerGroup
name", null);
- if (internalRemoveConsumerGroup(name) == null)
- {
- throw new NoSuchRegistrationException("There is no ConsumerGroup named
'" + name + "'.");
- }
- }
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(registrationId,
"Registration id", null);
- public void removeConsumer(String consumerId) throws RegistrationException
- {
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
- if (internalRemoveConsumer(consumerId) == null)
- {
- throw new RegistrationException("There is no Consumer with identity
'" + consumerId + "'.");
- }
+ return registrations.get(registrationId);
}
- public void removeRegistration(String registrationId) throws RegistrationException
+ public ConsumerGroup getConsumerGroup(String name) throws RegistrationException
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(registrationId,
"Registration identity", null);
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(name, "ConsumerGroup
name", null);
- Registration registration = internalRemoveRegistration(registrationId);
- if (registration == null)
- {
- throw new NoSuchRegistrationException("There is no Registration with id
'" + registrationId + "'");
- }
-
- ConsumerImpl consumer = (ConsumerImpl)registration.getConsumer();
- consumer.removeRegistration(registration);
+ return groups.get(name);
}
public Consumer getConsumerById(String consumerId) throws RegistrationException
@@ -123,102 +87,63 @@
return consumers.get(consumerId);
}
- public Registration addRegistrationFor(String consumerId, Map registrationProperties)
throws RegistrationException
+ @Override
+ protected void internalAddRegistration(RegistrationSPI registration)
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
- ParameterValidation.throwIllegalArgExceptionIfNull(registrationProperties,
"Registration properties");
-
- ConsumerImpl consumer = (ConsumerImpl)getConsumerById(consumerId);
- if (consumer == null)
- {
- throw new NoSuchRegistrationException("There is no Consumer with identity
'" + consumerId
- + "' to add a Registration to...");
- }
-
- RegistrationImpl registration = new RegistrationImpl("" +
lastRegistrationId++, consumer,
- RegistrationStatus.PENDING, registrationProperties);
- consumer.addRegistration(registration);
-
- internalAddRegistration(registration);
-
- return registration;
+ registrations.put(registration.getId(), registration);
}
- public Consumer addConsumerToGroupNamed(String consumerId, String groupName) throws
RegistrationException
+ @Override
+ protected RegistrationSPI internalRemoveRegistration(String registrationId)
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(consumerId,
"Consumer identity", null);
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(groupName,
"ConsumerGroup name", null);
-
- ConsumerGroupImpl group = (ConsumerGroupImpl)getConsumerGroup(groupName);
- if (group == null)
- {
- throw new NoSuchRegistrationException("There is no ConsumerGroup named
'" + groupName
- + "' to add a Consumer to...");
- }
-
- ConsumerImpl consumer = (ConsumerImpl)getConsumerById(consumerId);
- if (consumer == null)
- {
- throw new NoSuchRegistrationException("There is no Consumer with identity
'" + consumerId
- + "' to add to ConsumerGroup named '" + groupName +
"'. Did you create it?");
- }
-
- group.addConsumer(consumer);
-
- return consumer;
+ return registrations.remove(registrationId);
}
- public Collection<? extends Consumer> getConsumers()
+ @Override
+ protected RegistrationSPI internalCreateRegistration(ConsumerSPI consumer, Map
registrationProperties)
{
- return Collections.unmodifiableCollection(consumers.values());
+ return new RegistrationImpl("" + lastRegistrationId++, consumer,
RegistrationStatus.PENDING, registrationProperties);
}
- public Collection<? extends Registration> getRegistrations()
+ @Override
+ protected void internalAddConsumer(ConsumerSPI consumer)
{
- return Collections.unmodifiableCollection(registrations.values());
+ consumers.put(consumer.getId(), consumer);
}
- public Collection<? extends ConsumerGroup> getConsumerGroups()
+ @Override
+ protected ConsumerSPI internalRemoveConsumer(String consumerId)
{
- return Collections.unmodifiableCollection(groups.values());
+ return consumers.remove(consumerId);
}
- public Registration getRegistration(String registrationId)
+ @Override
+ protected ConsumerSPI internalCreateConsumer(String consumerId, String consumerName)
{
- ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(registrationId,
"Registration id", null);
-
- return registrations.get(registrationId);
+ return new ConsumerImpl(consumerId, consumerName);
}
- // internal methods: extension points for subclasses
-
- protected void internalAddRegistration(RegistrationImpl registration)
+ @Override
+ protected void internalAddConsumerGroup(ConsumerGroupSPI group)
{
- registrations.put(registration.getId(), registration);
+ groups.put(group.getName(), group);
}
- protected Registration internalRemoveRegistration(String registrationId)
+ @Override
+ protected ConsumerGroupSPI internalRemoveConsumerGroup(String name)
{
- return registrations.remove(registrationId);
+ return groups.remove(name);
}
- protected void internalAddConsumer(Consumer consumer)
+ @Override
+ protected ConsumerGroupSPI internalCreateConsumerGroup(String name)
{
- consumers.put(consumer.getId(), consumer);
+ return new ConsumerGroupImpl(name);
}
- protected Consumer internalRemoveConsumer(String consumerId)
+ @Override
+ protected ConsumerSPI getConsumerSPIById(String consumerId) throws
RegistrationException
{
- return consumers.remove(consumerId);
+ return (ConsumerSPI)getConsumerById(consumerId);
}
-
- protected void internalAddConsumerGroup(ConsumerGroup group)
- {
- groups.put(group.getName(), group);
- }
-
- protected ConsumerGroup internalRemoveConsumerGroup(String name)
- {
- return groups.remove(name);
- }
}
Added:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerGroupSPI.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerGroupSPI.java
(rev 0)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerGroupSPI.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -0,0 +1,33 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.gatein.registration.spi;
+
+import org.gatein.registration.ConsumerGroup;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public interface ConsumerGroupSPI extends ConsumerGroup
+{
+}
Added:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerSPI.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerSPI.java
(rev 0)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/ConsumerSPI.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -0,0 +1,37 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.gatein.registration.spi;
+
+import org.gatein.registration.Consumer;
+import org.gatein.registration.RegistrationException;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public interface ConsumerSPI extends Consumer
+{
+ void removeRegistration(RegistrationSPI registration) throws RegistrationException;
+
+ void addRegistration(RegistrationSPI registration);
+}
Added:
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/RegistrationSPI.java
===================================================================
---
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/RegistrationSPI.java
(rev 0)
+++
components/wsrp/trunk/producer/src/main/java/org/gatein/registration/spi/RegistrationSPI.java 2009-11-30
18:59:03 UTC (rev 873)
@@ -0,0 +1,34 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.gatein.registration.spi;
+
+import org.gatein.registration.Registration;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public interface RegistrationSPI extends Registration
+{
+ ConsumerSPI getConsumer();
+}