public class StreamSender extends Object
| Constructor and Description |
|---|
StreamSender(OutputStream outputStream)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isShutdown()
Return whether we are shutdown.
|
void |
send(Message message)
Send the given message.
|
void |
shutdown()
Cleanly shutdown the
Sender. |
protected void |
writeMessage(Message message)
Send a message.
|
protected static void |
writeMessageToStream(Message message,
OutputStream stream) |
public StreamSender(OutputStream outputStream)
outputStream - The output stream to write to.protected final void writeMessage(Message message) throws IOException
message - The message.IOException - If an error occurs.public void shutdown()
Sender. Ignore most errors,
connection has probably been reset by peer.public final void send(Message message) throws CommunicationException
send in interface Sendermessage - A Message.CommunicationException - If an error occurs.protected static final void writeMessageToStream(Message message, OutputStream stream) throws IOException
IOExceptionpublic boolean isShutdown()
true if and only if we are shut down.Copyright © 2000-2014. All Rights Reserved.