org.jboss.portal.registration.impl
Class RegistrationPersistenceManagerImpl

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.portal.jems.as.system.AbstractJBossService
              extended by org.jboss.portal.registration.impl.RegistrationPersistenceManagerImpl
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, RegistrationPersistenceManager, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class RegistrationPersistenceManagerImpl
extends AbstractJBossService
implements RegistrationPersistenceManager

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

Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
RegistrationPersistenceManagerImpl()
           
 
Method Summary
 Consumer addConsumerToGroupNamed(java.lang.String consumerId, java.lang.String groupName)
           
 Registration addRegistrationFor(java.lang.String consumerId, java.util.Map registrationProperties)
           
 Consumer createConsumer(java.lang.String consumerId, java.lang.String consumerName)
          Creates a Consumer with the specified identity and name (which might be the same, depending on the policy)
 ConsumerGroup createConsumerGroup(java.lang.String name)
          Creates a new ConsumerGroup with the associated name.
 Consumer getConsumerById(java.lang.String consumerId)
          Return an existing consumer from its id.
 ConsumerGroup getConsumerGroup(java.lang.String name)
          Retrieves the ConsumerGroup identified by the specified name.
 java.util.Collection getConsumerGroups()
           
 java.util.Collection getConsumers()
           
 Registration getRegistration(java.lang.String registrationId)
           
 java.util.Collection getRegistrations()
           
 void removeConsumer(java.lang.String consumerId)
           
 void removeConsumerGroup(java.lang.String name)
           
 void removeRegistration(java.lang.String registrationId)
           
 
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService
create, destroy, getState, getStateString, start, stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, startService, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationPersistenceManagerImpl

public RegistrationPersistenceManagerImpl()
Method Detail

createConsumer

public Consumer createConsumer(java.lang.String consumerId,
                               java.lang.String consumerName)
                        throws RegistrationException
Description copied from interface: RegistrationPersistenceManager
Creates a Consumer with the specified identity and name (which might be the same, depending on the policy)

Specified by:
createConsumer in interface RegistrationPersistenceManager
Throws:
RegistrationException

getConsumerGroup

public ConsumerGroup getConsumerGroup(java.lang.String name)
                               throws RegistrationException
Description copied from interface: RegistrationPersistenceManager
Retrieves the ConsumerGroup identified by the specified name.

Specified by:
getConsumerGroup in interface RegistrationPersistenceManager
Parameters:
name - the name of the group to be retrieved
Returns:
the ConsumerGroup identified by the specified name
Throws:
RegistrationException

createConsumerGroup

public ConsumerGroup createConsumerGroup(java.lang.String name)
                                  throws RegistrationException
Description copied from interface: RegistrationPersistenceManager
Creates a new ConsumerGroup with the associated name.

Specified by:
createConsumerGroup in interface RegistrationPersistenceManager
Parameters:
name - the name of the ConsumerGroup to be created
Returns:
a new ConsumerGroup with the associated name
Throws:
RegistrationException

removeConsumerGroup

public void removeConsumerGroup(java.lang.String name)
                         throws RegistrationException
Specified by:
removeConsumerGroup in interface RegistrationPersistenceManager
Throws:
RegistrationException

removeConsumer

public void removeConsumer(java.lang.String consumerId)
                    throws RegistrationException
Specified by:
removeConsumer in interface RegistrationPersistenceManager
Throws:
RegistrationException

removeRegistration

public void removeRegistration(java.lang.String registrationId)
                        throws RegistrationException
Specified by:
removeRegistration in interface RegistrationPersistenceManager
Throws:
RegistrationException

getConsumerById

public Consumer getConsumerById(java.lang.String consumerId)
                         throws RegistrationException
Description copied from interface: RegistrationPersistenceManager
Return an existing consumer from its id.

Specified by:
getConsumerById in interface RegistrationPersistenceManager
Parameters:
consumerId - the consumer id
Returns:
the consumer or null if it does not exist
Throws:
RegistrationException

addRegistrationFor

public Registration addRegistrationFor(java.lang.String consumerId,
                                       java.util.Map registrationProperties)
                                throws RegistrationException
Specified by:
addRegistrationFor in interface RegistrationPersistenceManager
Throws:
RegistrationException

addConsumerToGroupNamed

public Consumer addConsumerToGroupNamed(java.lang.String consumerId,
                                        java.lang.String groupName)
                                 throws RegistrationException
Specified by:
addConsumerToGroupNamed in interface RegistrationPersistenceManager
Throws:
RegistrationException

getConsumers

public java.util.Collection getConsumers()
Specified by:
getConsumers in interface RegistrationPersistenceManager

getRegistrations

public java.util.Collection getRegistrations()
Specified by:
getRegistrations in interface RegistrationPersistenceManager

getConsumerGroups

public java.util.Collection getConsumerGroups()
Specified by:
getConsumerGroups in interface RegistrationPersistenceManager

getRegistration

public Registration getRegistration(java.lang.String registrationId)
Specified by:
getRegistration in interface RegistrationPersistenceManager