NextApp Echo
App Container 1.1.4

nextapp.echoservlet.image
Class StreamImagePeer

java.lang.Object
  extended bynextapp.echoservlet.image.ImagePeer
      extended bynextapp.echoservlet.image.StreamImagePeer
All Implemented Interfaces:
CacheableService, java.util.EventListener, nextapp.echo.event.ImageUpdateListener, java.io.Serializable, Service

public class StreamImagePeer
extends ImagePeer
implements CacheableService, nextapp.echo.event.ImageUpdateListener

An image peer for StreamImageReferences.

See Also:
Serialized Form

Constructor Summary
StreamImagePeer()
          Default constructor.
 
Method Summary
 Service getAncillaryService()
          Returns the ancillary service used for rendering this image on the client.
 Id getId()
          Returns a unique identifier for this service.
 java.lang.String getUri(Connection conn)
          Returns the URI required to reference this image from a document rendered by the given Connection.
 int getVersion()
          Returns the version of the service to be retrieved.
 void imageUpdate(nextapp.echo.event.ImageUpdateEvent e)
          Invoked when an image update change occurs.
 void registered()
          Called to notify the image peer that it has been registered to an image.
 void service(Connection conn)
          Services an HTTP request.
 void setId(Id id)
          Sets the identifier for the ancillary service if one is required.
 
Methods inherited from class nextapp.echoservlet.image.ImagePeer
getImageReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamImagePeer

public StreamImagePeer()
Default constructor.

Method Detail

getId

public Id getId()
Description copied from interface: Service
Returns a unique identifier for this service.

Specified by:
getId in interface Service
Returns:
A unique identifier for this service.
See Also:
Service.getId()

getAncillaryService

public Service getAncillaryService()
Description copied from class: ImagePeer
Returns the ancillary service used for rendering this image on the client. Returns null if no ancillary service is required.

Specified by:
getAncillaryService in class ImagePeer
Returns:
The ancillary service used for rendering this image on the client.
See Also:
ImagePeer.getAncillaryService()

getUri

public java.lang.String getUri(Connection conn)
Description copied from class: ImagePeer
Returns the URI required to reference this image from a document rendered by the given Connection.

Specified by:
getUri in class ImagePeer
Parameters:
conn - The connection that is rendering the document that references the image.
Returns:
The URI of the image.
See Also:
ImagePeer.getUri(Connection)

getVersion

public int getVersion()
Description copied from interface: CacheableService
Returns the version of the service to be retrieved. When a service is requested with an updated version number, a non-cached copy will be used. getVersion() should return distinct values whenever the service's content may have changed.

Specified by:
getVersion in interface CacheableService
Returns:
The current version number of the service.
See Also:
CacheableService.getVersion()

imageUpdate

public void imageUpdate(nextapp.echo.event.ImageUpdateEvent e)
Description copied from interface: nextapp.echo.event.ImageUpdateListener
Invoked when an image update change occurs.

Specified by:
imageUpdate in interface nextapp.echo.event.ImageUpdateListener
Parameters:
e - The event describing the image update.
See Also:
ImageUpdateListener.imageUpdate(ImageUpdateEvent)

registered

public void registered()
Description copied from class: ImagePeer
Called to notify the image peer that it has been registered to an image. This method should be overridden when notification of registration is required.

Overrides:
registered in class ImagePeer
See Also:
ImagePeer.registered()

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(Connection)

setId

public void setId(Id id)
Description copied from class: ImagePeer
Sets the identifier for the ancillary service if one is required.

Overrides:
setId in class ImagePeer
Parameters:
id - The identifier for the ancillary service.
See Also:
ImagePeer.setId(Id)

NextApp Echo
App Container 1.1.4