Child pages
  • Custom Writers
Skip to end of metadata
Go to start of metadata

Abdera includes the ability to plug in custom serializers. These are implementations of the org.apache.abdera.writer.Writer interface and are configured via the classpath.

There are two custom Writer implementations that ship with Abdera. The PrettyXML writer and a JSON Writer.

Pretty XML Writer

The Pretty XML Writer is always available.

Using the 0.3.0-incubating release
Using the current trunk

JSON Writer

The JSON XML Writer is provided by the JSON Extension Jar

Using the 0.3.0-incubating release
Using the current trunk

The JSON Writer is only capable of writing Atom Entry documents.

Custom Writers

You can implement your own Writer by extending the AbstractNamedWriter class.

MyWriter.java

Once implemented, the custom writer is registered with Abdera by listing the full class name of the writer in the META-INF/services/org.apache.abdera.writer.NamedWriter file. You can include this file in your applications jar or classpath and it will be automatically discovered by Abdera.

  • No labels