org.restlet.engine.http.io
Class ClosingRepresentation

java.lang.Object
  extended by org.restlet.representation.Variant
      extended by org.restlet.representation.RepresentationInfo
          extended by org.restlet.representation.Representation
              extended by org.restlet.util.WrapperRepresentation
                  extended by org.restlet.engine.http.io.ClosingRepresentation

public class ClosingRepresentation
extends WrapperRepresentation

Wrapper representation to close the associated socket when the representation is released.

Author:
Jerome Louvel

Field Summary
 
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE
 
Constructor Summary
ClosingRepresentation(Representation wrappedRepresentation, Socket socket, Logger logger)
          Constructor.
 
Method Summary
 void release()
          Closes the socket if necessary.
 
Methods inherited from class org.restlet.util.WrapperRepresentation
checkDigest, checkDigest, computeDigest, exhaust, getAvailableSize, getChannel, getCharacterSet, getDigest, getDisposition, getDownloadName, getEncodings, getExpirationDate, getIdentifier, getLanguages, getLocationRef, getMediaType, getModificationDate, getRange, getReader, getSize, getStream, getTag, getText, getWrappedRepresentation, isAvailable, isDownloadable, isTransient, setAvailable, setCharacterSet, setDigest, setDisposition, setDownloadable, setDownloadName, setEncodings, setExpirationDate, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, setModificationDate, setRange, setSize, setTag, setTransient, write, write, write
 
Methods inherited from class org.restlet.representation.Representation
createEmpty
 
Methods inherited from class org.restlet.representation.Variant
createClientInfo, equals, includes, isCompatible, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClosingRepresentation

public ClosingRepresentation(Representation wrappedRepresentation,
                             Socket socket,
                             Logger logger)
Constructor.

Parameters:
wrappedRepresentation - The wrapped representation.
socket - The associated socket.
logger - The associated logger.
Method Detail

release

public void release()
Closes the socket if necessary.

Overrides:
release in class WrapperRepresentation


Copyright © 2005-2011 Noelios Technologies.