Package io.undertow.util
Class Transfer
- java.lang.Object
-
- io.undertow.util.Transfer
-
public class Transfer extends Object
- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description Transfer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <I extends org.xnio.channels.StreamSourceChannel,O extends org.xnio.channels.StreamSinkChannel>
voidinitiateTransfer(I source, O sink, org.xnio.ChannelListener<? super I> sourceListener, org.xnio.ChannelListener<? super O> sinkListener, org.xnio.ChannelExceptionHandler<? super I> readExceptionHandler, org.xnio.ChannelExceptionHandler<? super O> writeExceptionHandler, ByteBufferPool pool)Initiate a low-copy transfer between two stream channels.
-
-
-
Method Detail
-
initiateTransfer
public static <I extends org.xnio.channels.StreamSourceChannel,O extends org.xnio.channels.StreamSinkChannel> void initiateTransfer(I source, O sink, org.xnio.ChannelListener<? super I> sourceListener, org.xnio.ChannelListener<? super O> sinkListener, org.xnio.ChannelExceptionHandler<? super I> readExceptionHandler, org.xnio.ChannelExceptionHandler<? super O> writeExceptionHandler, ByteBufferPool pool)Initiate a low-copy transfer between two stream channels. The pool should be a direct buffer pool for best performance.- Parameters:
source- the source channelsink- the target channelsourceListener- the source listener to set and call when the transfer is complete, ornullto clear the listener at that timesinkListener- the target listener to set and call when the transfer is complete, ornullto clear the listener at that timereadExceptionHandler- the read exception handler to call if an error occurs during a read operationwriteExceptionHandler- the write exception handler to call if an error occurs during a write operationpool- the pool from which the transfer buffer should be allocated
-
-