org.qi4j.library.rest.server.restlet

## Class ResponseWriterDelegator

- java.lang.Object
- - org.qi4j.library.rest.server.restlet.ResponseWriterDelegator

- All Implemented Interfaces:
    ResponseWriter

      public class ResponseWriterDelegator
      extends Object
      implements ResponseWriter

  Delegates to a list of potential writers. Register writers on startup.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResponseWriterDelegator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `init(Iterable<ServiceReference<ResponseWriter>> resultWriters)`
    `void` | `registerResultWriter(ResponseWriter writer)`
    `boolean` | `writeResponse(Object result, org.restlet.Response response)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResponseWriterDelegator

          public ResponseWriterDelegator()

  - ### Method Detail

    - #### init

          public void init(@Service
                  Iterable<ServiceReference<ResponseWriter>> resultWriters)
                    throws InitializationException

      Throws:
        `InitializationException`

    - #### registerResultWriter

          public void registerResultWriter(ResponseWriter writer)

    - #### writeResponse

          public boolean writeResponse(Object result,
                              org.restlet.Response response)

      Specified by:
        `writeResponse` in interface `ResponseWriter`