Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nextapp.echo2.webcontainer.image
Class AbstractImageService

    java.lang.Object
      nextapp.echo2.webcontainer.image.AbstractImageService

All Implemented Interfaces:
  Service

Direct Known Subclasses:
  AwtImageService, StreamImageService

    public abstract class AbstractImageService

extends java.lang.Object
implements Service

Abstract base service for rendering images sourced from the application container.

Field Summary

Fields inherited from interface nextapp.echo2.webrender.Service
`DO_NOT_CACHE`

Constructor Summary
`AbstractImageService()`

Method Summary
`java.lang.String` | `createUri(ContainerInstance containerInstance, java.lang.String imageId)` Creates a URI to retrieve a specific image for a specific component from the server.
`abstract void` | `renderImage(Connection conn, ImageReference imageReference)` Renders the specified image to the given connection.
`void` | `service(Connection conn)` Services an HTTP request.
`void` | `serviceBadRequest(Connection conn, java.lang.String message)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface nextapp.echo2.webrender.Service
`getId, getVersion`

Constructor Detail

### AbstractImageService

    public AbstractImageService()

Method Detail

### createUri

    public java.lang.String createUri(ContainerInstance containerInstance,
                                      java.lang.String imageId)

  Creates a URI to retrieve a specific image for a specific component from the server.

  Parameters:
    `containerInstance` - the relevant application container instance.
    `imageId` - the unique id to retrieve the image from the `ContainerInstance`

### renderImage

    public abstract void renderImage(Connection conn,
                                     ImageReference imageReference)
                              throws java.io.IOException

  Renders the specified image to the given connection. Implementations should set the response content type, and write image data to the response `OutputStream`.

  Parameters:
    `conn` - the `Connection` on which to render the image
    `imageReference` - the image to be rendered
  Throws:
    `java.io.IOException` - if the image cannot be rendered

### service

    public void service(Connection conn)
                 throws java.io.IOException

  Description copied from interface: `Service`
  Services an HTTP request. Information about the HTTP request as well as methods for issuing a response are available from the provided Connection object.

  Specified by:
    `service` in interface `Service`
  Parameters:
    `conn` - A `Connection` object which wraps `HttpServletRequest` and `HttpServletResponse` objects and provides access to the facilities of the Echo application container.
  Throws:
    `java.io.IOException` - in the event of errors related to processing the HTTP request or producing a response.
  See Also:
    `Service.service(nextapp.echo2.webrender.Connection)`

### serviceBadRequest

    public void serviceBadRequest(Connection conn,
                                  java.lang.String message)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD