Removed FileRegion since a FileChannel can be mapped into a ChannelBuffer. What a lovely abstraction.
This commit is contained in:
parent
9ecd573937
commit
cc3b07c655
@ -17,12 +17,12 @@ package org.jboss.netty.channel;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listens to the progress of a time-consuming I/O operation such as
|
* Listens to the progress of a time-consuming I/O operation such as a large
|
||||||
* {@link FileRegion} transfer. If this listener is added to a
|
* file transfer. If this listener is added to a {@link ChannelFuture} of an
|
||||||
* {@link ChannelFuture} of an I/O operation that supports progress
|
* I/O operation that supports progress notification, the listener's
|
||||||
* notification, the listener's {@link #operationProgressed(ChannelFuture, long, long, long)}
|
* {@link #operationProgressed(ChannelFuture, long, long, long)} method will be
|
||||||
* method will be called back by an I/O thread. If the operation does not
|
* called back by an I/O thread. If the operation does not support progress
|
||||||
* support progress notification, {@link #operationProgressed(ChannelFuture, long, long, long)}
|
* notification, {@link #operationProgressed(ChannelFuture, long, long, long)}
|
||||||
* will not be invoked. Like a usual {@link ChannelFutureListener} that this
|
* will not be invoked. Like a usual {@link ChannelFutureListener} that this
|
||||||
* interface extends, {@link #operationComplete(ChannelFuture)} will be called
|
* interface extends, {@link #operationComplete(ChannelFuture)} will be called
|
||||||
* when the future is marked as complete.
|
* when the future is marked as complete.
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010 Red Hat, Inc.
|
|
||||||
*
|
|
||||||
* Red Hat licenses this file to you under the Apache License, version 2.0
|
|
||||||
* (the "License"); you may not use this file except in compliance with the
|
|
||||||
* License. You may obtain a copy of the License at:
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.jboss.netty.channel;
|
|
||||||
|
|
||||||
import java.nio.channels.FileChannel;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A region of a file that is sent via a {@link Channel} which supports
|
|
||||||
* zero-copy file transfer.
|
|
||||||
*
|
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
|
||||||
* @version $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
|
|
||||||
*/
|
|
||||||
public interface FileRegion {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the {@link FileChannel} from which data will be fetched.
|
|
||||||
*/
|
|
||||||
FileChannel getFileChannel();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the offset in the file where the transfer began.
|
|
||||||
*/
|
|
||||||
long getStartOffset();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the offset in the file where the transfer will end.
|
|
||||||
*/
|
|
||||||
long getEndOffset();
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user