Overview | Package | Class | Tree | Deprecated | Index | Help
| Portlet API 2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jetspeed.portlet
Interface PortletResponse

All Known Subinterfaces:
  SaxPortletResponse

public interface PortletResponse

The `PortletResponse` interface represents the response sent to the client device.

It is up to the portlet container to enhance, extend, or modify the response as required before it is actually sent to the client device.

See Also:
  `PortletRequest`

Method Summary
`void` | `addActionListener(ActionListener listener)` Adds the given listener to receive action events when one of the portlet URIs is called that will be part of this response.
`PortletURI` | `createURI(Portlet.Mode mode)` Create a portlet URI for the given portlet mode.
`String` | `encodeURI(String path)` Returns the encoded URI of the resource at the given path.
`PrintWriter` | `getWriter()` Returns the writer object that can be used to contribute markup to the portlet response.

Method Detail

### getWriter

    public PrintWriter getWriter()
                          throws IOException

  Returns the writer object that can be used to contribute markup to the portlet response.

  It is important to note that the markup generated by the portlet is either a full document or just a fragment of the markup. A corresponding setting in the deployment descriptor has to be made.

  Returns:
    the print writer
  Throws:
    `IOException` - if the I/O operation fails

### createURI

    public PortletURI createURI(Portlet.Mode mode)

  Create a portlet URI for the given portlet mode. The returned URI can be further extended by adding portlet-specific parameters and by attaching actions.
  Parameters:
    `mode` - the portlet mode
  Returns:
    a portlet URI

### encodeURI

    public String encodeURI(String path)

  Returns the encoded URI of the resource at the given path. Encoding may include prefixing, conversion to absolute URL, etc.
  Parameters:
    `path` - the path to the resource
  Returns:
    the resource URI as string

### addActionListener

    public void addActionListener(ActionListener listener)

  Adds the given listener to receive action events when one of the portlet URIs is called that will be part of this response.

  If the given listener is `null`, this method does nothing.

  Parameters:
    `listener` - the listener to be added

Overview | Package | Class | Tree | Deprecated | Index | Help
| Portlet API 2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD