Package com.yahoo.messagebus
Class SourceSessionParams
- java.lang.Object
-
- com.yahoo.messagebus.SourceSessionParams
-
public class SourceSessionParams extends java.lang.Object
To facilitate several configuration parameters to theMessageBus.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
Constructors Constructor Description SourceSessionParams()
Instantiates a parameter object with default values.SourceSessionParams(SourceSessionParams params)
Implements the copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReplyHandler
getReplyHandler()
Returns the handler to receive incoming replies.ThrottlePolicy
getThrottlePolicy()
Returns the policy to use for throttling output.double
getTimeout()
Returns the number of seconds a message can spend trying to succeed.SourceSessionParams
setReplyHandler(ReplyHandler handler)
Sets the handler to recive incoming replies.SourceSessionParams
setThrottlePolicy(ThrottlePolicy throttlePolicy)
Sets the policy to use for throttling output.SourceSessionParams
setTimeout(double timeout)
Sets the number of seconds a message can be attempted sent until it times out.
-
-
-
Constructor Detail
-
SourceSessionParams
public SourceSessionParams()
Instantiates a parameter object with default values.
-
SourceSessionParams
public SourceSessionParams(SourceSessionParams params)
Implements the copy constructor.- Parameters:
params
- the object to copy
-
-
Method Detail
-
getThrottlePolicy
public ThrottlePolicy getThrottlePolicy()
Returns the policy to use for throttling output.
-
setThrottlePolicy
public SourceSessionParams setThrottlePolicy(ThrottlePolicy throttlePolicy)
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
public SourceSessionParams setTimeout(double timeout)
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
public ReplyHandler getReplyHandler()
Returns the handler to receive incoming replies.- Returns:
- the handler
-
setReplyHandler
public SourceSessionParams setReplyHandler(ReplyHandler handler)
Sets the handler to recive incoming replies.- Parameters:
handler
- The handler to set.- Returns:
- this, to allow chaining
-
-