Class PendingDocumentIdReference

java.lang.Object
io.micronaut.serde.reference.PropertyReference<Object,Object>
io.micronaut.serde.support.reference.PendingDocumentIdReference

@Internal public final class PendingDocumentIdReference extends PropertyReference<Object,Object>
A reference to a bean that has not been read yet. Pushed through PropertyReferenceManager.pushManagedRef(PropertyReference); the consumer receives the bean once a DocumentIdReference with the same identifier is registered, and the document fails to complete if that never happens.
Since:
3.2
  • Constructor Details

    • PendingDocumentIdReference

      public PendingDocumentIdReference(String id, io.micronaut.core.type.Argument<?> type, PendingDocumentIdReference.DocumentIdConsumer consumer)
      Creates a pending reference.
      Parameters:
      id - The identifier
      type - The expected bean type
      consumer - Receives the bean
  • Method Details

    • isInstance

      public boolean isInstance(Object bean)
      Checks whether a bean is compatible with the expected bean type.
      Parameters:
      bean - The bean
      Returns:
      Whether the bean is an instance of the expected bean type
    • getTypeName

      public String getTypeName()
      Returns the name of the expected bean type.
      Returns:
      The name of the expected bean type
    • getConsumer

      Returns the consumer of the bean.
      Returns:
      The consumer of the bean