|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.webcontainer.service.ImageService
public class ImageService
A Service
which renders stream image references (including ResourceImageReference
s and
AwtImageReference
s.
Field Summary | |
---|---|
static ImageService |
INSTANCE
Singleton instance of this Service . |
Fields inherited from interface nextapp.echo.webcontainer.Service |
---|
DO_NOT_CACHE |
Constructor Summary | |
---|---|
ImageService()
|
Method Summary | |
---|---|
java.lang.String |
createUri(UserInstance userInstance,
java.lang.String imageId)
Creates a URI to retrieve a specific image for a specific component from the server. |
java.lang.String |
getId()
Returns the unique identifier of this service. |
nextapp.echo.app.ImageReference |
getImage(UserInstance userInstance,
java.lang.String imageId)
Gets the image with the specified id. |
int |
getVersion()
Returns the version of the service to be retrieved. |
void |
renderImage(Connection conn,
nextapp.echo.app.ImageReference imageReference)
Renders the specified image to the given connection. |
void |
service(Connection conn)
Services an HTTP request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ImageService INSTANCE
Service
.
Constructor Detail |
---|
public ImageService()
Method Detail |
---|
public java.lang.String getId()
Service
getId
in interface Service
Service.getId()
public int getVersion()
Service
getVersion()
should return distinct values whenever the
service's content may have changed.
getVersion
in interface Service
Service.getVersion()
public java.lang.String createUri(UserInstance userInstance, java.lang.String imageId)
userInstance
- the relevant application user instanceimageId
- the unique id to retrieve the image from the
ContainerInstance
public void renderImage(Connection conn, nextapp.echo.app.ImageReference imageReference) throws java.io.IOException
OutputStream
.
conn
- the Connection
on which to render the imageimageReference
- the image to be rendered
java.io.IOException
- if the image cannot be renderedpublic nextapp.echo.app.ImageReference getImage(UserInstance userInstance, java.lang.String imageId)
userInstance
- the UserInstance
from which the image was requestedimageId
- the id of the image
null
otherwise.public void service(Connection conn) throws java.io.IOException
Service
service
in interface Service
conn
- a Connection
object which wraps
HttpServletRequest
and
HttpServletResponse
objects and provides
access to the facilities of the Echo application container
java.io.IOException
- in the event of errors related to processing the
HTTP request or producing a responseService.service(nextapp.echo.webcontainer.Connection)
|
NextApp Echo3 v3.0.b4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |