Package org.codice.alliance.libs.klv
Class LoggingKlvHandler
java.lang.Object
org.codice.alliance.libs.klv.LoggingKlvHandler
- All Implemented Interfaces:
KlvHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement) The handler accepts the incoming KLV metadata.Optional<ddf.catalog.data.Attribute>AfterKlvHandler.accept(KlvDataElement)has been called with all of the incoming data, this method will convert it to anAttribute.Get the name of the metacard attribute that is associated with this handler.voidreset()Reset the handler to its initial state.
-
Constructor Details
-
LoggingKlvHandler
public LoggingKlvHandler()
-
-
Method Details
-
getAttributeName
Description copied from interface:KlvHandlerGet the name of the metacard attribute that is associated with this handler.- Specified by:
getAttributeNamein interfaceKlvHandler- Returns:
- name of metacard attribute
-
asAttribute
Description copied from interface:KlvHandlerAfterKlvHandler.accept(KlvDataElement)has been called with all of the incoming data, this method will convert it to anAttribute. If there is insufficient data to create an Attribute, then the Optional will be empty.- Specified by:
asAttributein interfaceKlvHandler- Returns:
- optional attribute
-
accept
public void accept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement) Description copied from interface:KlvHandlerThe 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:
acceptin interfaceKlvHandler- Parameters:
klvDataElement- incoming klv metadata
-
reset
public void reset()Description copied from interface:KlvHandlerReset the handler to its initial state.- Specified by:
resetin interfaceKlvHandler
-