org.jboss.portal.registration.impl
Class ConsumerImpl

java.lang.Object
  extended by org.jboss.portal.registration.impl.ConsumerImpl
All Implemented Interfaces:
Consumer

public class ConsumerImpl
extends java.lang.Object
implements Consumer

Since:
2.6
Version:
$Revision: 8784 $
Author:
Chris Laprun

Method Summary
 boolean equals(java.lang.Object o)
           
 ConsumerCapabilities getCapabilities()
           
 java.lang.String getConsumerAgent()
           
 ConsumerGroup getGroup()
          Returns the group that this consumer belongs to.
 java.lang.String getId()
          Retrieves this Consumer's identity, which uniquely identifies the Consumer since the name cannot be relied on.
 java.lang.String getName()
          Return the consumer name.
 java.util.Collection getRegistrations()
          Return all the registrations for the specified consumer.
 RegistrationStatus getStatus()
          Return the registration status of the consumer entity.
 int hashCode()
           
 void setCapabilities(ConsumerCapabilities capabilities)
           
 void setConsumerAgent(java.lang.String consumerAgent)
           
 void setGroup(ConsumerGroup group)
           
 void setStatus(RegistrationStatus status)
          Set the registration status of the consumer entity.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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

getName

public java.lang.String getName()
Description copied from interface: Consumer
Return the consumer name.

Specified by:
getName in interface Consumer
Returns:
the consumer name

getId

public java.lang.String getId()
Description copied from interface: Consumer
Retrieves this Consumer's identity, which uniquely identifies the Consumer since the name cannot be relied on. It is up to the RegistrationPolicy to determine what the Consumer's identity is. Note also that this is different from the Consumer's database identifier.

Specified by:
getId in interface Consumer
Returns:
this Consumer's identity.

getConsumerAgent

public java.lang.String getConsumerAgent()
Specified by:
getConsumerAgent in interface Consumer

setConsumerAgent

public void setConsumerAgent(java.lang.String consumerAgent)
                      throws java.lang.IllegalArgumentException,
                             java.lang.IllegalStateException
Specified by:
setConsumerAgent in interface Consumer
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException

getCapabilities

public ConsumerCapabilities getCapabilities()
Specified by:
getCapabilities in interface Consumer

setCapabilities

public void setCapabilities(ConsumerCapabilities capabilities)
Specified by:
setCapabilities in interface Consumer

getStatus

public RegistrationStatus getStatus()
Description copied from interface: Consumer
Return the registration status of the consumer entity.

Specified by:
getStatus in interface Consumer
Returns:
the registration stats.

setStatus

public void setStatus(RegistrationStatus status)
Description copied from interface: Consumer
Set the registration status of the consumer entity.

Specified by:
setStatus in interface Consumer
Parameters:
status - the registration status

getRegistrations

public java.util.Collection getRegistrations()
                                      throws RegistrationException
Description copied from interface: Consumer
Return all the registrations for the specified consumer.

Specified by:
getRegistrations in interface Consumer
Returns:
the consumer registrations
Throws:
RegistrationException

getGroup

public ConsumerGroup getGroup()
Description copied from interface: Consumer
Returns the group that this consumer belongs to.

Specified by:
getGroup in interface Consumer
Returns:
the consumer group

setGroup

public void setGroup(ConsumerGroup group)
              throws RegistrationException
Specified by:
setGroup in interface Consumer
Throws:
RegistrationException