net.krecan.m2_proxy.repository.httpclient
Class HttpClientResource

java.lang.Object
  extended by net.krecan.m2_proxy.resource.AbstractResource
      extended by net.krecan.m2_proxy.repository.httpclient.HttpClientResource
All Implemented Interfaces:
Resource

public class HttpClientResource
extends AbstractResource

Special resource implementation for HttpClient

Author:
Lukas Krecan

Constructor Summary
HttpClientResource(String logicalName, org.apache.commons.httpclient.methods.GetMethod method)
           
 
Method Summary
 void copyToStream(OutputStream outputStream)
          Copies the resource to the output stream.
 long getLastModified()
          Is not supported, since we do not need it yet.
 long getLength()
          Returns length of the resource
protected  org.apache.commons.httpclient.methods.GetMethod getMethod()
           
 void release()
          Releases all system resources blocked by this resource :-) It HAS to be called after using the resource.
protected  void setMethod(org.apache.commons.httpclient.methods.GetMethod method)
           
 
Methods inherited from class net.krecan.m2_proxy.resource.AbstractResource
finalize, getLogicalName, isReleased, setLogicalName, setReleased
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientResource

public HttpClientResource(String logicalName,
                          org.apache.commons.httpclient.methods.GetMethod method)
Method Detail

getLength

public long getLength()
Description copied from interface: Resource
Returns length of the resource

Returns:

copyToStream

public void copyToStream(OutputStream outputStream)
                  throws IOException
Description copied from interface: Resource
Copies the resource to the output stream. You can call this method only once. It means, you can not recycle a resource. After copying, you have to release the resource.

Throws:
IOException

getMethod

protected org.apache.commons.httpclient.methods.GetMethod getMethod()

setMethod

protected void setMethod(org.apache.commons.httpclient.methods.GetMethod method)

release

public void release()
Description copied from interface: Resource
Releases all system resources blocked by this resource :-) It HAS to be called after using the resource.


getLastModified

public long getLastModified()
Is not supported, since we do not need it yet. If needed, can be implemented.

Returns:


Copyright © 2006 null. All Rights Reserved.