Arquillian Warp Extension: Implementation 1.0.0.Alpha1

org.jboss.arquillian.warp.server.lifecycle
Class LifecycleManagerStoreImpl

java.lang.Object
  extended by org.jboss.arquillian.warp.spi.LifecycleManagerStore
      extended by org.jboss.arquillian.warp.server.lifecycle.LifecycleManagerStoreImpl

public class LifecycleManagerStoreImpl
extends LifecycleManagerStore

Stores the bindings from auxiliary class instance to LifecycleManagerImpl.

Author:
Lukas Fryc

Constructor Summary
LifecycleManagerStoreImpl()
           
 
Method Summary
<T> void
bind(Class<T> clazz, T object)
          Binds the current LifecycleManagerImpl with given object of given class.
static
<T> LifecycleManagerImpl
get(Class<T> clazz, T boundObject)
          Retrieves instance of LifecycleManagerImpl for given instance of given class.
<T> void
unbind(Class<T> clazz, T object)
          Unbinds the LifecycleManagerImpl for given class and given object.
<T> void
verifyManagerUnbound()
          Verifies that there is no object bound with current LifecycleManagerImpl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifecycleManagerStoreImpl

public LifecycleManagerStoreImpl()
Method Detail

get

public static <T> LifecycleManagerImpl get(Class<T> clazz,
                                           T boundObject)
                                throws ObjectNotAssociatedException
Retrieves instance of LifecycleManagerImpl for given instance of given class.

Parameters:
clazz - the class used as denominator during retrieval
boundObject - the object used as key for retriving LifecycleManagerImpl
Returns:
the bound instance of LifecycleManagerImpl
Throws:
ObjectNotAssociatedException - when instance of no such class and class' instance was associated with any LifecycleManagerImpl

bind

public <T> void bind(Class<T> clazz,
                     T object)
          throws ObjectAlreadyAssociatedException
Binds the current LifecycleManagerImpl with given object of given class.

Specified by:
bind in class LifecycleManagerStore
Parameters:
clazz - the class to be bound
object - the object to be bound
Throws:
ObjectAlreadyAssociatedException - when there is already object bound with LifecycleManagerImpl for given class.

unbind

public <T> void unbind(Class<T> clazz,
                       T object)
            throws ObjectNotAssociatedException
Unbinds the LifecycleManagerImpl for given class and given object.

Specified by:
unbind in class LifecycleManagerStore
Parameters:
clazz - the bound class
object - the bound class
Throws:
ObjectNotAssociatedException - when no object bound with LifecycleManagerImpl.

verifyManagerUnbound

public <T> void verifyManagerUnbound()
                          throws StoreHasAssociatedObjectsException
Verifies that there is no object bound with current LifecycleManagerImpl.

Throws:
StoreHasAssociatedObjectsException - when there is object bound with current LifecycleManagerImpl.

Arquillian Warp Extension: Implementation 1.0.0.Alpha1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.