Class AbstractPrincipalSerializer<Type>

java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<Type>
Type Parameters:
Type - generic type of serialization
All Implemented Interfaces:
PrincipalSerializer<Type>, Component, DestructableComponent, InitializableComponent
Direct Known Subclasses:
AuthenticationResultPrincipalSerializer, GenericPrincipalSerializer, IdPAttributePrincipalSerializer, LDAPPrincipalSerializer, NameIDPrincipalSerializer, ProxyAuthenticationPrincipalSerializer, SimplePrincipalSerializer, X500PrincipalSerializer

@ThreadSafe
public abstract class AbstractPrincipalSerializer<Type>
extends AbstractInitializableComponent
implements PrincipalSerializer<Type>
Base class for PrincipalSerializer implementations.
  • Field Details

    • generatorFactory

      @Nonnull private final javax.json.stream.JsonGeneratorFactory generatorFactory
      JSON generator factory.
    • readerFactory

      @Nonnull private final javax.json.JsonReaderFactory readerFactory
      JSON reader factory.
  • Constructor Details

    • AbstractPrincipalSerializer

      public AbstractPrincipalSerializer()
      Constructor.
  • Method Details

    • getJsonGenerator

      @Nonnull protected javax.json.stream.JsonGenerator getJsonGenerator​(@Nonnull Writer writer)
      Get a JsonGenerator, synchronized for thread-safety.
      Parameters:
      writer - destination for output
      Returns:
      a generator
    • getJsonReader

      @Nonnull protected javax.json.JsonReader getJsonReader​(@Nonnull Reader reader)
      Get a JsonReader, synchronized for thread-safety.
      Parameters:
      reader - source of input
      Returns:
      a reader