Package org.jboss.weld.serialization
Class ContextualStoreImpl
- java.lang.Object
-
- org.jboss.weld.serialization.ContextualStoreImpl
-
- All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service,org.jboss.weld.serialization.spi.ContextualStore
public class ContextualStoreImpl extends Object implements org.jboss.weld.serialization.spi.ContextualStore
Implementation ofContextualStore- Author:
- Pete Muir
-
-
Constructor Summary
Constructors Constructor Description ContextualStoreImpl(String contextId, BeanIdentifierIndex beanIdentifierIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()<C extends Contextual<I>,I>
CgetContextual(String id)Given a particular id, return the correct contextual.<C extends Contextual<I>,I>
CgetContextual(org.jboss.weld.serialization.spi.BeanIdentifier identifier)<C extends Contextual<I>,I>
org.jboss.weld.serialization.spi.helpers.SerializableContextual<C,I>getSerializableContextual(Contextual<I> contextual)<C extends Contextual<I>,I>
org.jboss.weld.serialization.spi.helpers.SerializableContextualInstance<C,I>getSerializableContextualInstance(Contextual<I> contextual, I instance, CreationalContext<I> creationalContext)org.jboss.weld.serialization.spi.BeanIdentifierputIfAbsent(Contextual<?> contextual)Add a contextual (if not already present) to the store, and return it's id.voidremoveAll(Iterable<Bean<?>> removable)
-
-
-
Constructor Detail
-
ContextualStoreImpl
public ContextualStoreImpl(String contextId, BeanIdentifierIndex beanIdentifierIndex)
-
-
Method Detail
-
getContextual
public <C extends Contextual<I>,I> C getContextual(String id)
Given a particular id, return the correct contextual. For contextuals which aren't passivation capable, the contextual can't be found in another container, and null will be returned.- Specified by:
getContextualin interfaceorg.jboss.weld.serialization.spi.ContextualStore- Parameters:
id- An identifier for the contextual- Returns:
- the contextual
-
getContextual
public <C extends Contextual<I>,I> C getContextual(org.jboss.weld.serialization.spi.BeanIdentifier identifier)
- Specified by:
getContextualin interfaceorg.jboss.weld.serialization.spi.ContextualStore
-
putIfAbsent
public org.jboss.weld.serialization.spi.BeanIdentifier putIfAbsent(Contextual<?> contextual)
Add a contextual (if not already present) to the store, and return it's id. If the contextual is passivation capable, it's id will be used, otherwise an id will be generated- Specified by:
putIfAbsentin interfaceorg.jboss.weld.serialization.spi.ContextualStore- Parameters:
contextual- the contextual to add- Returns:
- the current id for the contextual
-
getSerializableContextual
public <C extends Contextual<I>,I> org.jboss.weld.serialization.spi.helpers.SerializableContextual<C,I> getSerializableContextual(Contextual<I> contextual)
- Specified by:
getSerializableContextualin interfaceorg.jboss.weld.serialization.spi.ContextualStore
-
getSerializableContextualInstance
public <C extends Contextual<I>,I> org.jboss.weld.serialization.spi.helpers.SerializableContextualInstance<C,I> getSerializableContextualInstance(Contextual<I> contextual, I instance, CreationalContext<I> creationalContext)
- Specified by:
getSerializableContextualInstancein interfaceorg.jboss.weld.serialization.spi.ContextualStore
-
cleanup
public void cleanup()
- Specified by:
cleanupin interfaceorg.jboss.weld.bootstrap.api.Service
-
-