abstract class StreamManager extends AnyRef
The StreamManager is used to fetch individual chunks from a stream. This is used in
TransportRequestHandler in order to respond to fetchChunk() requests. Creation of the
stream is outside the scope of the transport layer, but a given stream is guaranteed to be read
by only one client connection, meaning that getChunk() for a particular stream will be called
serially and that once the connection associated with the stream is closed, that stream will
never be used again.
- Alphabetic
- By Inheritance
- StreamManager
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StreamManager()
Abstract Value Members
-
abstract
def
getChunk(streamId: Long, chunkIndex: Int): ManagedBuffer
Called in response to a fetchChunk() request.
Called in response to a fetchChunk() request. The returned buffer will be passed as-is to the client. A single stream will be associated with a single TCP connection, so this method will not be called in parallel for a particular stream.
Chunks may be requested in any order, and requests may be repeated, but it is not required that implementations support this behavior.
The returned ManagedBuffer will be release()'d after being written to the network.
- streamId
id of a stream that has been previously registered with the StreamManager.
- chunkIndex
0-indexed chunk of the stream that's requested
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
checkAuthorization(client: TransportClient, streamId: Long): Unit
Verify that the client is authorized to read from the given stream.
Verify that the client is authorized to read from the given stream.
- Exceptions thrown
SecurityExceptionIf client is not authorized.
-
def
chunkBeingSent(streamId: Long): Unit
Called when start sending a chunk.
-
def
chunkSent(streamId: Long): Unit
Called when a chunk is successfully sent.
-
def
chunksBeingTransferred(): Long
Return the number of chunks being transferred and not finished yet in this StreamManager.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
connectionTerminated(channel: Channel): Unit
Indicates that the given channel has been terminated.
Indicates that the given channel has been terminated. After this occurs, we are guaranteed not to read from the associated streams again, so any state can be cleaned up.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
openStream(streamId: String): ManagedBuffer
Called in response to a stream() request.
Called in response to a stream() request. The returned data is streamed to the client through a single TCP connection.
Note the
streamIdargument is not related to the similarly named argument in theint)method.- streamId
id of a stream that has been previously registered with the StreamManager.
- returns
A managed buffer for the stream, or null if the stream was not found.
-
def
streamBeingSent(streamId: String): Unit
Called when start sending a stream.
-
def
streamSent(streamId: String): Unit
Called when a stream is successfully sent.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()