public class DefaultStreamTransportFactory extends Object implements StreamTransportFactory
Constructor and Description |
---|
DefaultStreamTransportFactory() |
Modifier and Type | Method and Description |
---|---|
String |
getDigest() |
int |
getMaximumMessageSize() |
Future<?> |
initiateTransport(Stream stream,
com.levigo.jadice.server.shared.transport.internal.TransportSender transport)
Create a transport for the given InputStream.
|
void |
setDigest(String digest)
Set an (optional) digest for integrity of transported streams
|
void |
setMaximumMessageSize(int maximumMessageSize)
If the stream must be split in several messages, this value limits the maximum size of the
individual messages.
|
void |
shutdown()
Shut down the stream transport factory.
|
void |
startup()
Initialize the stream transport factory.
|
public Future<?> initiateTransport(Stream stream, com.levigo.jadice.server.shared.transport.internal.TransportSender transport) throws StreamTransportException, com.levigo.jadice.server.shared.transport.internal.TransportAbortedException
StreamTransportFactory
initiateTransport
in interface StreamTransportFactory
stream
- the Stream
to transporttransport
- a TransportSender which can be used by the transportStreamTransportException
com.levigo.jadice.server.shared.transport.internal.TransportAbortedException
public void startup() throws StreamTransportException
StreamTransportFactory
startup
in interface StreamTransportFactory
StreamTransportException
public void shutdown() throws StreamTransportException
StreamTransportFactory
shutdown
in interface StreamTransportFactory
StreamTransportException
public void setDigest(String digest) throws NoSuchAlgorithmException
StreamTransportFactory
setDigest
in interface StreamTransportFactory
digest
- Name of the digest algorithm (or null
to disable feature)NoSuchAlgorithmException
- If no digest with the given name was foundpublic String getDigest()
getDigest
in interface StreamTransportFactory
null
if no checking is enabled)public void setMaximumMessageSize(int maximumMessageSize)
StreamTransportFactory
setMaximumMessageSize
in interface StreamTransportFactory
maximumMessageSize
- max. size of a message (in bytes)public int getMaximumMessageSize()
getMaximumMessageSize
in interface StreamTransportFactory
Copyright © 2017 levigo holding gmbh. All rights reserved.