com.atlassian.bamboo.v2.build.agent.remote.sender
Class BatchedMessageSender

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.agent.remote.sender.BatchedMessageSender
All Implemented Interfaces:
BambooAgentMessageSender

@ThreadSafe
public class BatchedMessageSender
extends Object
implements BambooAgentMessageSender

A sender strategy that batches the messages up in a queue and periodically flushes the queue.


Constructor Summary
BatchedMessageSender(BambooAgentMessageSender delegate, HomeDirectoryLayout homeDirectoryLayout, ObjectSerialiserDispatcher objectSerialiserDispatcher)
           
 
Method Summary
 void flush()
           
 Object send(BambooAgentMessage message)
          Sends a BambooAgentMessage, and any others that have been submitted but not yet sent, to the server immediately.
 void submit(BambooAgentMessage message)
          Submits a BambooAgentMessage to be sent to the server when convenient.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchedMessageSender

public BatchedMessageSender(BambooAgentMessageSender delegate,
                            HomeDirectoryLayout homeDirectoryLayout,
                            ObjectSerialiserDispatcher objectSerialiserDispatcher)
Method Detail

send

public Object send(@NotNull
                   BambooAgentMessage message)
Description copied from interface: BambooAgentMessageSender

Sends a BambooAgentMessage, and any others that have been submitted but not yet sent, to the server immediately.

Specified by:
send in interface BambooAgentMessageSender
Parameters:
message - The BambooAgentMessage to send.

submit

public void submit(@NotNull
                   BambooAgentMessage message)
Description copied from interface: BambooAgentMessageSender

Submits a BambooAgentMessage to be sent to the server when convenient.

Specified by:
submit in interface BambooAgentMessageSender
Parameters:
message - The BambooAgentMessage to submit.

flush

public void flush()


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.