public class AllPassThrottlePolicy extends Object implements ThrottlePolicy
ThrottlePolicy
that passes all requests (no real throttling).Constructor and Description |
---|
AllPassThrottlePolicy() |
Modifier and Type | Method and Description |
---|---|
boolean |
canSend(Message msg,
int pendingCount)
Returns whether or not the given message can be sent according to the current state of this policy.
|
void |
processMessage(Message msg)
This method is called once for every message that was accepted by
ThrottlePolicy.canSend(Message, int) and sent. |
void |
processReply(Reply reply)
This method is called once for every reply that is received.
|
public boolean canSend(Message msg, int pendingCount)
ThrottlePolicy
canSend
in interface ThrottlePolicy
msg
- The message to evaluate.pendingCount
- The current number of pending messages.public void processMessage(Message msg)
ThrottlePolicy
ThrottlePolicy.canSend(Message, int)
and sent.processMessage
in interface ThrottlePolicy
msg
- The message beint sent.public void processReply(Reply reply)
ThrottlePolicy
processReply
in interface ThrottlePolicy
reply
- The reply received.Copyright © 2018. All rights reserved.