Class LoggingKlvHandler

java.lang.Object
org.codice.alliance.libs.klv.LoggingKlvHandler
All Implemented Interfaces:
KlvHandler

public class LoggingKlvHandler extends Object implements KlvHandler
  • Constructor Details

    • LoggingKlvHandler

      public LoggingKlvHandler()
  • Method Details

    • getAttributeName

      public String getAttributeName()
      Description copied from interface: KlvHandler
      Get the name of the metacard attribute that is associated with this handler.
      Specified by:
      getAttributeName in interface KlvHandler
      Returns:
      name of metacard attribute
    • asAttribute

      public Optional<ddf.catalog.data.Attribute> asAttribute()
      Description copied from interface: KlvHandler
      After KlvHandler.accept(KlvDataElement) has been called with all of the incoming data, this method will convert it to an Attribute. If there is insufficient data to create an Attribute, then the Optional will be empty.
      Specified by:
      asAttribute in interface KlvHandler
      Returns:
      optional attribute
    • accept

      public void accept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement)
      Description copied from interface: KlvHandler
      The handler accepts the incoming KLV metadata. If the incoming KLV metadata is not the datatype expected by this handler, then the handler should log a warning and return.
      Specified by:
      accept in interface KlvHandler
      Parameters:
      klvDataElement - incoming klv metadata
    • reset

      public void reset()
      Description copied from interface: KlvHandler
      Reset the handler to its initial state.
      Specified by:
      reset in interface KlvHandler