Here is a short abstract what the PortletUrl listener should do:
Portlets can register portlet URL listeners in order to filter URLs before they get
generated either as string the toString or written to the output stream via the write
method of the BaseURL interface. For example the portlet could use such a listener to set
the caching level of resource URLs in one central piece of code.
In order to receive a callback from the portlet container before a portlet URL is generated
the portlet needs to implement the PortletURLGenerationListener interface and
register it in the deployment descriptor.