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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractImageService
public AbstractImageService()
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 imageimageReference - 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)