org.spicefactory.pimento.io
Class ServiceResponseEncoder

java.lang.Object
  extended by org.spicefactory.pimento.io.ServiceResponseEncoder

public class ServiceResponseEncoder
extends Object

Responsible for encoding a single response, in particular for encoding entity snapshot representations contained in the return value of the operation.

Author:
Jens Halm

Constructor Summary
ServiceResponseEncoder(Metamodel metamodel)
          Creates a new instance.
 
Method Summary
 void encode(ServiceResponse response, SnapshotEncoder encoder, FetchPlan fetchPlan)
          Encodes the specified response using the given encoder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceResponseEncoder

public ServiceResponseEncoder(Metamodel metamodel)
Creates a new instance.

Parameters:
metamodel - the metamodel for all entities managed by Pimento
Method Detail

encode

public void encode(ServiceResponse response,
                   SnapshotEncoder encoder,
                   FetchPlan fetchPlan)
Encodes the specified response using the given encoder.

Parameters:
response - the response to encode
encoder - the encoder to use for encoding entity snapshots
fetchPlan - the effective FetchPlan for this request or null if none has been specified in the request.