public class MessageBusParams extends Object
MessageBus
constructor, all parameters are held by this
class. This class has reasonable default values for each parameter.Constructor and Description |
---|
MessageBusParams()
Constructs a new instance of this parameter object with default values for all members.
|
MessageBusParams(MessageBusParams params)
Implements the copy constructor.
|
Modifier and Type | Method and Description |
---|---|
MessageBusParams |
addProtocol(Protocol protocol)
Adds a new protocol to this.
|
MessageBusParams |
addProtocols(List<Protocol> protocols)
Registers multiple protocols with this by calling
addProtocol(Protocol) multiple times. |
int |
getMaxPendingCount()
Returns the maximum number of pending messages.
|
int |
getMaxPendingSize()
Returns the maximum number of bytes allowed for pending messages.
|
int |
getNumProtocols()
Returns the number of protocols that are contained in this.
|
Protocol |
getProtocol(int i)
Returns the protocol at the given index.
|
com.yahoo.messagebus.routing.RetryPolicy |
getRetryPolicy()
Returns the retry policy for the resender.
|
MessageBusParams |
setMaxPendingCount(int maxCount)
Sets the maximum number of allowed pending messages.
|
MessageBusParams |
setMaxPendingSize(int maxSize)
Sets the maximum number of bytes allowed for pending messages.
|
MessageBusParams |
setRetryPolicy(com.yahoo.messagebus.routing.RetryPolicy retryPolicy)
Sets the retry policy for the resender.
|
public MessageBusParams()
public MessageBusParams(MessageBusParams params)
params
- The object to copy.public com.yahoo.messagebus.routing.RetryPolicy getRetryPolicy()
public MessageBusParams setRetryPolicy(com.yahoo.messagebus.routing.RetryPolicy retryPolicy)
retryPolicy
- The policy to set.public MessageBusParams addProtocol(Protocol protocol)
protocol
- The protocol to add.public MessageBusParams addProtocols(List<Protocol> protocols)
addProtocol(Protocol)
multiple times.protocols
- The protocols to register.public int getNumProtocols()
public Protocol getProtocol(int i)
i
- The index of the protocol to return.public int getMaxPendingCount()
public MessageBusParams setMaxPendingCount(int maxCount)
maxCount
- The count limit to set.public int getMaxPendingSize()
public MessageBusParams setMaxPendingSize(int maxSize)
maxSize
- The size limit to set.Copyright © 2018. All rights reserved.