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 of ContextualStore
Author:
Pete Muir
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContextualStoreImpl(String contextId, BeanIdentifierIndex beanIdentifierIndex)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    <C extends jakarta.enterprise.context.spi.Contextual<I>, I>
    C
    Given a particular id, return the correct contextual.
    <C extends jakarta.enterprise.context.spi.Contextual<I>, I>
    C
    getContextual(org.jboss.weld.serialization.spi.BeanIdentifier identifier)
     
    <C extends jakarta.enterprise.context.spi.Contextual<I>, I>
    org.jboss.weld.serialization.spi.helpers.SerializableContextual<C,I>
    getSerializableContextual(jakarta.enterprise.context.spi.Contextual<I> contextual)
     
    <C extends jakarta.enterprise.context.spi.Contextual<I>, I>
    org.jboss.weld.serialization.spi.helpers.SerializableContextualInstance<C,I>
    getSerializableContextualInstance(jakarta.enterprise.context.spi.Contextual<I> contextual, I instance, jakarta.enterprise.context.spi.CreationalContext<I> creationalContext)
     
    org.jboss.weld.serialization.spi.BeanIdentifier
    putIfAbsent(jakarta.enterprise.context.spi.Contextual<?> contextual)
    Add a contextual (if not already present) to the store, and return it's id.
    void
    removeAll(Iterable<jakarta.enterprise.inject.spi.Bean<?>> removable)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getContextual

      public <C extends jakarta.enterprise.context.spi.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:
      getContextual in interface org.jboss.weld.serialization.spi.ContextualStore
      Parameters:
      id - An identifier for the contextual
      Returns:
      the contextual
    • getContextual

      public <C extends jakarta.enterprise.context.spi.Contextual<I>, I> C getContextual(org.jboss.weld.serialization.spi.BeanIdentifier identifier)
      Specified by:
      getContextual in interface org.jboss.weld.serialization.spi.ContextualStore
    • putIfAbsent

      public org.jboss.weld.serialization.spi.BeanIdentifier putIfAbsent(jakarta.enterprise.context.spi.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:
      putIfAbsent in interface org.jboss.weld.serialization.spi.ContextualStore
      Parameters:
      contextual - the contextual to add
      Returns:
      the current id for the contextual
    • getSerializableContextual

      public <C extends jakarta.enterprise.context.spi.Contextual<I>, I> org.jboss.weld.serialization.spi.helpers.SerializableContextual<C,I> getSerializableContextual(jakarta.enterprise.context.spi.Contextual<I> contextual)
      Specified by:
      getSerializableContextual in interface org.jboss.weld.serialization.spi.ContextualStore
    • getSerializableContextualInstance

      public <C extends jakarta.enterprise.context.spi.Contextual<I>, I> org.jboss.weld.serialization.spi.helpers.SerializableContextualInstance<C,I> getSerializableContextualInstance(jakarta.enterprise.context.spi.Contextual<I> contextual, I instance, jakarta.enterprise.context.spi.CreationalContext<I> creationalContext)
      Specified by:
      getSerializableContextualInstance in interface org.jboss.weld.serialization.spi.ContextualStore
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in interface org.jboss.weld.bootstrap.api.Service
    • removeAll

      public void removeAll(Iterable<jakarta.enterprise.inject.spi.Bean<?>> removable)