SUMMARY:
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.FileChannel
org.alfresco.repo.content.AbstractContentAccessor.CallbackFileChannel
- All Implemented Interfaces:
- java.io.Closeable, java.nio.channels.ByteChannel, java.nio.channels.Channel, java.nio.channels.GatheringByteChannel, java.nio.channels.InterruptibleChannel, java.nio.channels.ReadableByteChannel, java.nio.channels.ScatteringByteChannel, java.nio.channels.WritableByteChannel
- Enclosing class:
- AbstractContentAccessor
protected class AbstractContentAccessor.CallbackFileChannel
- extends java.nio.channels.FileChannel
Wraps a FileChannel
to provide callbacks to listeners when the
channel is closed
.
This class is unfortunately necessary as the FileChannel
doesn't have
an single interface defining its methods, making it difficult to put an
advice around the methods that require overriding.
AbstractContentAccessor.CallbackFileChannel
public AbstractContentAccessor.CallbackFileChannel(java.nio.channels.FileChannel delegate,
java.util.List listeners)
- Parameters:
delegate
- the channel that will perform the worklisteners
- listeners for events coming from this channel