org.jboss.portal.registration.impl
Class ConsumerGroupImpl

java.lang.Object
  extended by org.jboss.portal.registration.impl.ConsumerGroupImpl
All Implemented Interfaces:
ConsumerGroup

public class ConsumerGroupImpl
extends java.lang.Object
implements ConsumerGroup

Version:
$Revision:5672 $
Author:
Julien Viet

Method Summary
 void addConsumer(Consumer consumer)
           
 boolean contains(Consumer consumer)
           
 boolean equals(java.lang.Object o)
           
 Consumer getConsumer(java.lang.String consumerId)
          Return the member Consumer associated with the given identifier
 java.util.Collection getConsumers()
          Return a collection of associated consumers.
 java.lang.String getName()
          Return this ConsumerGroup's name (i.e.
 RegistrationStatus getStatus()
           
 int hashCode()
           
 boolean isEmpty()
           
 void removeConsumer(Consumer consumer)
           
 void setStatus(RegistrationStatus status)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Description copied from interface: ConsumerGroup
Return this ConsumerGroup's name (i.e. the name of the the business entity aggregating the associated consumers)

Specified by:
getName in interface ConsumerGroup
Returns:
the ConsumerGroup's name

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getStatus

public RegistrationStatus getStatus()
Specified by:
getStatus in interface ConsumerGroup

setStatus

public void setStatus(RegistrationStatus status)
Specified by:
setStatus in interface ConsumerGroup

getConsumers

public java.util.Collection getConsumers()
                                  throws RegistrationException
Description copied from interface: ConsumerGroup
Return a collection of associated consumers.

Specified by:
getConsumers in interface ConsumerGroup
Returns:
the consumer collection
Throws:
RegistrationException

getConsumer

public Consumer getConsumer(java.lang.String consumerId)
                     throws java.lang.IllegalArgumentException,
                            RegistrationException
Description copied from interface: ConsumerGroup
Return the member Consumer associated with the given identifier

Specified by:
getConsumer in interface ConsumerGroup
Returns:
the Consumer associated with the identity or null if no such Consumer is part of this ConsumerGroup
Throws:
java.lang.IllegalArgumentException - if the consumer identity is null
RegistrationException

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface ConsumerGroup

addConsumer

public void addConsumer(Consumer consumer)
                 throws RegistrationException
Specified by:
addConsumer in interface ConsumerGroup
Throws:
RegistrationException

removeConsumer

public void removeConsumer(Consumer consumer)
                    throws RegistrationException
Specified by:
removeConsumer in interface ConsumerGroup
Throws:
RegistrationException

contains

public boolean contains(Consumer consumer)
Specified by:
contains in interface ConsumerGroup