aerogear-controller 1.0.2

org.jboss.aerogear.controller.router
Interface Consumer

All Known Implementing Classes:
JsonConsumer

public interface Consumer

A Consumer is capable of unmarshalling an Http Request Body into a Java Object representation.


Method Summary
 String mediaType()
          The media type that this consumer can handle.
<T> T
unmarshall(javax.servlet.http.HttpServletRequest request, Class<T> type)
          Will unmarshall the the HttpServletRequest into an instance of type T
 

Method Detail

mediaType

String mediaType()
The media type that this consumer can handle.

Returns:
String the media type that this consumer can handle.

unmarshall

<T> T unmarshall(javax.servlet.http.HttpServletRequest request,
                 Class<T> type)
Will unmarshall the the HttpServletRequest into an instance of type T

Parameters:
request - the HttpServletRequest.
type - the type that the request should be unmarshalled to.
Returns:
T an instance of type T.

aerogear-controller 1.0.2

Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.