Package com.yahoo.messagebus
Class SourceSessionParams
java.lang.Object
com.yahoo.messagebus.SourceSessionParams
To facilitate several configuration parameters to the
MessageBus.createSourceSession(ReplyHandler, SourceSessionParams)
, all parameters are held by this class. This class has reasonable default values for each
parameter.- Author:
- Simon Thoresen Hult
-
Constructor Summary
ConstructorDescriptionInstantiates a parameter object with default values.Implements the copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the handler to receive incoming replies.Returns the policy to use for throttling output.double
Returns the number of seconds a message can spend trying to succeed.setReplyHandler
(ReplyHandler handler) Sets the handler to recive incoming replies.setThrottlePolicy
(ThrottlePolicy throttlePolicy) Sets the policy to use for throttling output.setTimeout
(double timeout) Sets the number of seconds a message can be attempted sent until it times out.
-
Constructor Details
-
SourceSessionParams
public SourceSessionParams()Instantiates a parameter object with default values. -
SourceSessionParams
Implements the copy constructor.- Parameters:
params
- the object to copy
-
-
Method Details
-
getThrottlePolicy
Returns the policy to use for throttling output. -
setThrottlePolicy
Sets the policy to use for throttling output.- Parameters:
throttlePolicy
- The policy to set.- Returns:
- this, to allow chaining
-
getTimeout
public double getTimeout()Returns the number of seconds a message can spend trying to succeed.- Returns:
- the timeout in seconds
-
setTimeout
Sets the number of seconds a message can be attempted sent until it times out. This is the maximum allowed time for any message bus operation.- Parameters:
timeout
- The numer of seconds allowed.- Returns:
- this, to allow chaining
-
getReplyHandler
Returns the handler to receive incoming replies.- Returns:
- the handler
-
setReplyHandler
Sets the handler to recive incoming replies.- Parameters:
handler
- The handler to set.- Returns:
- this, to allow chaining
-