public class StreamManagerServer extends Object implements StreamingServer, StreamManager
Modifier and Type | Class and Description |
---|---|
class |
StreamManagerServer.DownloadSession |
class |
StreamManagerServer.UploadSession |
Constructor and Description |
---|
StreamManagerServer(InvokerLocator locator,
File tmpDir) |
StreamManagerServer(String serverLocator,
File tmpDir) |
StreamManagerServer(String host,
int port,
File tmpDir) |
StreamManagerServer(TransporterServer transporterServer,
File tmpDir) |
Modifier and Type | Method and Description |
---|---|
void |
addResource(String uri,
StreamSource src) |
String |
addStream(StreamSource src) |
void |
closeDownloadSession(long sid) |
void |
closeUploadSession(String uri) |
DownloadInfo |
createDownloadSession(String uri) |
String |
createUploadSession() |
byte[] |
downloadBytes(long sid,
int size)
Downloads the next 'size' bytes from the given download session.
|
StreamSource |
getStream(String uri) |
boolean |
hasStream(String uri) |
static void |
main(String[] args) |
void |
removeStream(String uri) |
void |
start() |
void |
stop() |
void |
uploadBytes(String uri,
byte[] bytes)
Uploads the given bytes.
|
public StreamManagerServer(String host, int port, File tmpDir) throws Exception
Exception
public StreamManagerServer(String serverLocator, File tmpDir) throws Exception
Exception
public StreamManagerServer(InvokerLocator locator, File tmpDir) throws Exception
Exception
public StreamManagerServer(TransporterServer transporterServer, File tmpDir) throws Exception
Exception
public void start() throws Exception
start
in interface StreamManager
Exception
public void stop() throws Exception
stop
in interface StreamManager
Exception
public String addStream(StreamSource src) throws IOException
addStream
in interface StreamManager
IOException
public void addResource(String uri, StreamSource src)
public StreamSource getStream(String uri)
getStream
in interface StreamManager
public boolean hasStream(String uri)
hasStream
in interface StreamingServer
hasStream
in interface StreamManager
public void removeStream(String uri)
removeStream
in interface StreamingServer
removeStream
in interface StreamManager
public DownloadInfo createDownloadSession(String uri) throws IOException
createDownloadSession
in interface StreamingServer
IOException
public byte[] downloadBytes(long sid, int size) throws IOException
StreamingServer
downloadBytes
in interface StreamingServer
sid
- the download sessionsize
- the number of bytes to downloadIOException
public void closeDownloadSession(long sid) throws IOException
closeDownloadSession
in interface StreamingServer
IOException
public String createUploadSession() throws IOException
createUploadSession
in interface StreamingServer
IOException
public void uploadBytes(String uri, byte[] bytes) throws IOException
StreamingServer
uploadBytes
in interface StreamingServer
uri
- the stream uribytes
- the bytes to uploadIOException
public void closeUploadSession(String uri) throws IOException
closeUploadSession
in interface StreamingServer
IOException
public static void main(String[] args)
Copyright © 2013 Nuxeo SA. All Rights Reserved.