ChannelType - the type of the channel opened by the
ChannelOpenerpublic interface ChannelOpener<ChannelType extends Channel>
Channel for processing. This
interface must open a new channel each new request.
This interface was designed for the AsyncChannelLink and so to
preserve the contract of AsyncDataLink instances of
ChannelOpener must always open the channel to the same source
(e.g.: to the same file) whenever requested.
AsyncChannelLink| Modifier and Type | Method and Description |
|---|---|
ChannelType |
openChanel()
Opens a new channel to the source defined by this
ChannelOpener instance. |
ChannelType openChanel() throws IOException
ChannelOpener instance. This method opens a new channel each
time called an these opened channels must be
closed separately.ChannelOpener instance. The returned instance must be
closed in order to prevent resource leakage.
This method never returns null.IOException - thrown if the channel could not be opened for some
reasons