Class DiskManagerChannelImpl.request
java.lang.Object
com.biglybt.pifimpl.local.disk.DiskManagerChannelImpl.request
- All Implemented Interfaces:
DiskManagerRequest
- Enclosing class:
DiskManagerChannelImpl
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate List<DiskManagerListener> private intprivate longprivate longprivate intprivate String(package private) AESemaphoreFields inherited from interface DiskManagerRequest
REQUEST_READ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(DiskManagerListener listener) voidcancel()longGet the number of bytes available for immediate reading from the request given its current position.longGet the number of bytes remaining to be read for the requestprotected Stringprotected voidprotected voidvoidremoveListener(DiskManagerListener listener) voidrun()voidsetLength(long _length) voidsetMaximumReadChunkSize(int size) voidsetOffset(long _offset) voidsetType(int _type) voidsetUserAgent(String str) Beware that invoking this method signifies that the media is being streamed and therefore may undergo transformations such as MOOV atom relocation in mp4s
-
Field Details
-
request_type
private int request_type -
request_offset
private long request_offset -
request_length
private long request_length -
listeners
-
user_agent
-
max_read_chunk
private int max_read_chunk -
cancelled
private volatile boolean cancelled -
wait_sem
AESemaphore wait_sem
-
-
Constructor Details
-
request
protected request()
-
-
Method Details
-
setType
public void setType(int _type) - Specified by:
setTypein interfaceDiskManagerRequest
-
setOffset
public void setOffset(long _offset) - Specified by:
setOffsetin interfaceDiskManagerRequest
-
setLength
public void setLength(long _length) - Specified by:
setLengthin interfaceDiskManagerRequest
-
setMaximumReadChunkSize
public void setMaximumReadChunkSize(int size) - Specified by:
setMaximumReadChunkSizein interfaceDiskManagerRequest
-
getRemaining
public long getRemaining()Description copied from interface:DiskManagerRequestGet the number of bytes remaining to be read for the request- Specified by:
getRemainingin interfaceDiskManagerRequest- Returns:
-
setUserAgent
Description copied from interface:DiskManagerRequestBeware that invoking this method signifies that the media is being streamed and therefore may undergo transformations such as MOOV atom relocation in mp4s- Specified by:
setUserAgentin interfaceDiskManagerRequest- Parameters:
str-
-
getUserAgent
-
getAvailableBytes
public long getAvailableBytes()Description copied from interface:DiskManagerRequestGet the number of bytes available for immediate reading from the request given its current position. If this information is not known (download not running) then -1 is returned- Specified by:
getAvailableBytesin interfaceDiskManagerRequest- Returns:
-
run
public void run()- Specified by:
runin interfaceDiskManagerRequest
-
cancel
public void cancel()- Specified by:
cancelin interfaceDiskManagerRequest
-
inform
-
inform
-
addListener
- Specified by:
addListenerin interfaceDiskManagerRequest
-
removeListener
- Specified by:
removeListenerin interfaceDiskManagerRequest
-