Class XmlExtension

java.lang.Object
dev.relism.flash.ext.jackson.xml.XmlExtension
All Implemented Interfaces:
dev.relism.flash.extension.FlashExtension

public class XmlExtension extends Object implements dev.relism.flash.extension.FlashExtension
XML for an application: the Xml codec and the middleware that serializes what a handler returns.

 XmlExtension xml = new XmlExtension();
 app.install(xml).use(xml.auto());
 

Install it beside JsonExtension when an application speaks both: each provides its own codec, and a route picks one by the handler it extends.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
    XmlExtension(com.fasterxml.jackson.dataformat.xml.XmlMapper mapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    dev.relism.flash.routing.Middleware
    Serializes what a handler returns, unless it already returned a response, bytes or text.
    void
    configure(dev.relism.flash.extension.FlashRegistrar<?> app, dev.relism.flash.extension.FlashContext ctx)
     

    Methods inherited from class java.lang.Object

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

    • XmlExtension

      public XmlExtension()
    • XmlExtension

      public XmlExtension(com.fasterxml.jackson.dataformat.xml.XmlMapper mapper)
  • Method Details

    • auto

      public dev.relism.flash.routing.Middleware auto()
      Serializes what a handler returns, unless it already returned a response, bytes or text.
    • configure

      public void configure(dev.relism.flash.extension.FlashRegistrar<?> app, dev.relism.flash.extension.FlashContext ctx)
      Specified by:
      configure in interface dev.relism.flash.extension.FlashExtension