org.apache.tapestry.engine
Interface ServiceEncoder

All Known Implementing Classes:
AssetEncoder, DirectServiceEncoder, PageServiceEncoder, PathEncoder, ServiceExtensionEncoder

public interface ServiceEncoder

Encapsulates the logic for encoding and decoding service requests.

Since:
4.0

Method Summary
 void decode(ServiceEncoding encoding)
          Invoked to decode a request.
 void encode(ServiceEncoding encoding)
          Invoked by the LinkFactory to encode the request.
 

Method Detail

encode

void encode(ServiceEncoding encoding)
Invoked by the LinkFactory to encode the request. Encoding is the process of modifying the encoding object to represent the same data in a different format; the canoncial example is to replace the ServiceConstants.PAGEand ServiceConstants.SERVICEquery parameters with a servlet path (i.e., "/Home.html", if the ".html" extension is mapped to the page service).

The LinkFactory iterates over a collection of encoders, stopping once the ServiceRequestEncoding is modified in any way.


decode

void decode(ServiceEncoding encoding)
Invoked to decode a request. The encoder is responsible for recognizing a request it may have encoded, and for restoring any query parameters is may have removed.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.