net.grinder.communication
Class QueuedSenderDecorator

java.lang.Object
  extended by net.grinder.communication.QueuedSenderDecorator
All Implemented Interfaces:
QueuedSender, Sender

public final class QueuedSenderDecorator
extends Object
implements QueuedSender

QueuedSender implementation.

Author:
Philip Aston

Constructor Summary
QueuedSenderDecorator(Sender delegate)
          Constructor.
 
Method Summary
 void flush()
          Send any pending messages queued with Sender.send(net.grinder.communication.Message).
 void send(Message message)
          Queue the given message for later sending.
 void shutdown()
          Cleanly shutdown the Sender.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueuedSenderDecorator

public QueuedSenderDecorator(Sender delegate)
Constructor.

Parameters:
delegate - Sender to decorate.
Method Detail

send

public void send(Message message)
          throws CommunicationException
Queue the given message for later sending.

Specified by:
send in interface Sender
Parameters:
message - A Message.
Throws:
CommunicationException - If an error occurs.

flush

public void flush()
           throws CommunicationException
Send any pending messages queued with Sender.send(net.grinder.communication.Message).

Specified by:
flush in interface QueuedSender
Throws:
CommunicationException - If an error occurs.

shutdown

public void shutdown()
Cleanly shutdown the Sender.

Any queued messages are discarded.

Specified by:
shutdown in interface Sender


Copyright © 2000-2013. All Rights Reserved.