org.apache.tapestry.engine.encoders
Class DirectServiceEncoder

java.lang.Object
  extended by org.apache.tapestry.engine.encoders.DirectServiceEncoder
All Implemented Interfaces:
ServiceEncoder

public class DirectServiceEncoder
extends Object
implements ServiceEncoder

A specialized encoder for the direct service  that encodes the page name and component id path into the servlet path, and encodes the stateful flag by choosing one of two extensions.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
DirectServiceEncoder()
           
 
Method Summary
 void decode(ServiceEncoding encoding)
          Invoked to decode a request.
 void encode(ServiceEncoding encoding)
          Invoked by the LinkFactory to encode the request.
 void setStatefulExtension(String statefulExtension)
           
 void setStatelessExtension(String statelessExtension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectServiceEncoder

public DirectServiceEncoder()
Method Detail

encode

public void encode(ServiceEncoding encoding)
Description copied from interface: ServiceEncoder
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.

Specified by:
encode in interface ServiceEncoder

decode

public void decode(ServiceEncoding encoding)
Description copied from interface: ServiceEncoder
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.

Specified by:
decode in interface ServiceEncoder

setStatefulExtension

public void setStatefulExtension(String statefulExtension)

setStatelessExtension

public void setStatelessExtension(String statelessExtension)


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