|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectConnectionQueueMgr
Manages the SNAC queue for a single SNAC processor (or "connection").
Instances of this class must be obtained from a
RateLimitingQueueMgr
's getQueueMgr
or getQueueMgrs
methods; an instance is created automatically upon assigning a
RateLimitingQueueMgr
as the SNAC queue manager for a given SNAC
processor.
Method Summary | |
RateLimitingQueueMgr |
getParentQueueMgr()
Returns this SNAC connection queue manager's "parent" RateLimitingQueueMgr . |
RateMonitor |
getRateMonitor()
Returns the rate monitor being used to determine when to send SNAC commands on the associated SNAC connection. |
RateQueue |
getRateQueue(CmdType type)
Returns the rate queue in which a command of the given type would be placed. |
ClientSnacProcessor |
getSnacProcessor()
Returns the SNAC processor whose rate queues are being managed by this queue manager. |
boolean |
isPaused()
Returns whether the SNAC queue for the associated connection is currently paused. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public RateLimitingQueueMgr getParentQueueMgr()
RateLimitingQueueMgr
.
public RateMonitor getRateMonitor()
public ClientSnacProcessor getSnacProcessor()
public RateQueue getRateQueue(CmdType type)
RateQueue
for the duration of the underlying SNAC
connection. That is, RateQueue
references can safely be kept
for the duration of a SNAC connection. To be notified of when rate
information changes, one could use code such as the following:
connQueueMgr.getRateMonitor().addListener(myRateListener);When new rate information is received (that is, when
RateListener.gotRateClasses(net.kano.joscar.ratelim.RateMonitor)
is called), old rate queues are discarded
and new ones are created as per the new rate information.
null
in the case that no
rate information has yet been received or the server did not specify
a default rate class (this is very abnormal behavior and will most likely
never happen when using AOL's servers).
type
- the command type whose rate queue is to be returned
public boolean isPaused()
ClientSnacProcessor.pause()
,
ClientSnacProcessor.unpause()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |