public abstract class AbstractContentAccessor extends Object implements ContentAccessor
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractContentAccessor.CallbackFileChannel
Wraps a
FileChannel to provide callbacks to listeners when the
channel is closed. |
protected class |
AbstractContentAccessor.ChannelCloseCallbackAdvise
Advise that listens for the completion of specific methods on the
ByteChannel interface. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractContentAccessor(String contentUrl) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
channelOpened()
Derived classes can call this method to ensure that necessary trace logging is performed
when the IO Channel is opened.
|
protected void |
finalize() |
protected FileChannel |
getCallbackFileChannel(FileChannel directChannel,
List<ContentStreamListener> listeners)
Generate a callback instance of the
FileChannel. |
ContentData |
getContentData() |
String |
getContentUrl() |
String |
getEncoding() |
Locale |
getLocale() |
String |
getMimetype() |
protected void |
setContentUrl(String contentUrl)
Allow derived implementations to set the Content URL.
|
void |
setEncoding(String encoding) |
void |
setLocale(Locale locale) |
void |
setMimetype(String mimetype) |
String |
toString() |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, getSize, isChannelOpenprotected AbstractContentAccessor(String contentUrl)
contentUrl - the content URLprotected void finalize()
throws Throwable
public ContentData getContentData()
getContentData in interface ContentAccessorprotected final void channelOpened()
public String getContentUrl()
getContentUrl in interface ContentAccessorprotected void setContentUrl(String contentUrl)
contentUrl - the new content URLpublic String getMimetype()
getMimetype in interface ContentAccessorpublic void setMimetype(String mimetype)
setMimetype in interface ContentAccessormimetype - the underlying content's mimetype - null if unknownpublic String getEncoding()
getEncoding in interface ContentAccessorpublic void setEncoding(String encoding)
setEncoding in interface ContentAccessorencoding - the underlying content's encoding - null if unknownpublic Locale getLocale()
getLocale in interface ContentAccessorpublic void setLocale(Locale locale)
setLocale in interface ContentAccessorlocale - the content's locale, if known.protected FileChannel getCallbackFileChannel(FileChannel directChannel, List<ContentStreamListener> listeners) throws ContentIOException
FileChannel.directChannel - the delegate that to perform the actual operationslisteners - the listeners to callContentIOExceptionCopyright © 2005–2021 Alfresco Software. All rights reserved.