org.nuxeo.runtime.services.streaming
Class StreamManagerServer
java.lang.Object
org.nuxeo.runtime.services.streaming.StreamManagerServer
- All Implemented Interfaces:
- StreamingServer, StreamManager
public class StreamManagerServer
- extends java.lang.Object
- implements StreamingServer, StreamManager
- Author:
- Bogdan Stefanescu
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamManagerServer
public StreamManagerServer(java.lang.String host,
int port,
java.io.File tmpDir)
throws java.lang.Exception
- Throws:
java.lang.Exception
StreamManagerServer
public StreamManagerServer(java.lang.String serverLocator,
java.io.File tmpDir)
throws java.lang.Exception
- Throws:
java.lang.Exception
StreamManagerServer
public StreamManagerServer(InvokerLocator locator,
java.io.File tmpDir)
throws java.lang.Exception
- Throws:
java.lang.Exception
StreamManagerServer
public StreamManagerServer(TransporterServer transporterServer,
java.io.File tmpDir)
throws java.lang.Exception
- Throws:
java.lang.Exception
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface StreamManager
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface StreamManager
- Throws:
java.lang.Exception
addStream
public java.lang.String addStream(StreamSource src)
throws java.io.IOException
- Specified by:
addStream
in interface StreamManager
- Throws:
java.io.IOException
addResource
public void addResource(java.lang.String uri,
StreamSource src)
getStream
public StreamSource getStream(java.lang.String uri)
- Specified by:
getStream
in interface StreamManager
hasStream
public boolean hasStream(java.lang.String uri)
- Specified by:
hasStream
in interface StreamingServer
- Specified by:
hasStream
in interface StreamManager
removeStream
public void removeStream(java.lang.String uri)
- Specified by:
removeStream
in interface StreamingServer
- Specified by:
removeStream
in interface StreamManager
createDownloadSession
public DownloadInfo createDownloadSession(java.lang.String uri)
throws java.io.IOException
- Specified by:
createDownloadSession
in interface StreamingServer
- Throws:
java.io.IOException
downloadBytes
public byte[] downloadBytes(long sid,
int size)
throws java.io.IOException
- Description copied from interface:
StreamingServer
- Downloads the next 'size' bytes from the given download session.
- Specified by:
downloadBytes
in interface StreamingServer
- Parameters:
sid
- the download sessionsize
- the number of bytes to download
- Returns:
- the downloaded byte array or null if no more bytes are available
- Throws:
java.io.IOException
closeDownloadSession
public void closeDownloadSession(long sid)
throws java.io.IOException
- Specified by:
closeDownloadSession
in interface StreamingServer
- Throws:
java.io.IOException
createUploadSession
public java.lang.String createUploadSession()
throws java.io.IOException
- Specified by:
createUploadSession
in interface StreamingServer
- Throws:
java.io.IOException
uploadBytes
public void uploadBytes(java.lang.String uri,
byte[] bytes)
throws java.io.IOException
- Description copied from interface:
StreamingServer
- Uploads the given bytes.
- Specified by:
uploadBytes
in interface StreamingServer
- Parameters:
uri
- the stream uribytes
- the bytes to upload
- Throws:
java.io.IOException
closeUploadSession
public void closeUploadSession(java.lang.String uri)
throws java.io.IOException
- Specified by:
closeUploadSession
in interface StreamingServer
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
Copyright © 2010 Nuxeo SAS. All Rights Reserved.