Class

com.twitter.finatra.http.internal.marshalling

MessageBodyManager

Related Doc: package marshalling

Permalink

class MessageBodyManager extends AnyRef

Manages registration of message body components. I.e., components that specify how to parse an incoming Finagle HTTP request body into a model object ("message body reader") and how to render a given type as a response ("message body writer").

A default implementation for both a reader and a writer is necessary in order to specify the behavior to invoke when a reader or writer is not found for a requested type T. The framework binds two default implementations: DefaultMessageBodyReader and DefaultMessageBodyWriter via the com.twitter.finatra.http.modules.MessageBodyModule.

These defaults are overridable by providing a customized MessageBodyModule in your com.twitter.finatra.http.HttpServer by overriding the com.twitter.finatra.http.HttpServer.messageBodyModule.

When the MessageBodyManager is obtained from the injector (which is configured with the framework com.twitter.finatra.http.modules.MessageBodyModule the framework default implementations for the reader and writer will be provided accordingly (along with the configured server injector).

Annotations
@Singleton()
See also

com.twitter.finatra.http.modules.MessageBodyModule

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MessageBodyManager
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MessageBodyManager(injector: Injector, defaultMessageBodyReader: DefaultMessageBodyReader, defaultMessageBodyWriter: DefaultMessageBodyWriter)

    Permalink

    injector

    the configured com.twitter.inject.Injector for the server.

    defaultMessageBodyReader

    a default message body reader implementation.

    defaultMessageBodyWriter

    a default message body writer implementation.

    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add[MBC <: MessageBodyComponent](reader: MBC)(implicit arg0: Manifest[MBC]): Unit

    Permalink
  5. def add[MBC <: MessageBodyComponent]()(implicit arg0: Manifest[MBC]): Unit

    Permalink
  6. def addByAnnotation[Ann <: Annotation, T <: MessageBodyWriter[_]]()(implicit arg0: Manifest[Ann], arg1: Manifest[T]): Unit

    Permalink
  7. def addByComponentType[M <: MessageBodyComponent, T <: MessageBodyWriter[_]]()(implicit arg0: Manifest[M], arg1: Manifest[T]): Unit

    Permalink
  8. def addExplicit[MBC <: MessageBodyComponent, TypeToReadOrWrite]()(implicit arg0: Manifest[MBC], arg1: Manifest[TypeToReadOrWrite]): Unit

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def read[T](request: Request)(implicit arg0: Manifest[T]): T

    Permalink
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def writer(obj: Any): MessageBodyWriter[Any]

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped