com.day.cq.replication
Interface ReplicationContent

All Known Implementing Classes:
FileContent

public interface ReplicationContent

This interface describes the assembled content to replicate.


Method Summary
 void destroy()
          Destroy the cached content.
 void dispose(String agentName)
          Decrement the usage counter and destroy the cached content if noone else is using the content.
 long getContentLength()
          Return the content length if known
 String getContentType()
          Get the content type
 InputStream getInputStream()
          Get the input stream for the content.
 boolean hasDisposed(String agentName)
          Has the agent already disposed this content?
 void use()
          Increment the usage counter.
 

Method Detail

getInputStream

InputStream getInputStream()
                           throws IOException
Get the input stream for the content.

Returns:
return the inpurt stream for this content
Throws:
IOException - if an I/O error occurrs

getContentType

String getContentType()
Get the content type

Returns:
The content type or null.

dispose

void dispose(String agentName)
Decrement the usage counter and destroy the cached content if noone else is using the content.

Parameters:
agentName - The name of the agent.

use

void use()
Increment the usage counter.


hasDisposed

boolean hasDisposed(String agentName)
Has the agent already disposed this content?

Parameters:
agentName - The name of the agent.
Returns:
True of dispose has been called already.

getContentLength

long getContentLength()
Return the content length if known

Returns:
Return the content length or -1 if the length is unknown.

destroy

void destroy()
Destroy the cached content. This destroys the cached content regardless of the current value of the usage counter.



Copyright © 2009 Day Management AG. All Rights Reserved.