|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectImmediateSnacQueueManager
A SNAC queue manager that sends all SNACs immediately, only queueing SNACs during a pause.
| Constructor Summary | |
ImmediateSnacQueueManager()
|
|
| Method Summary | |
void |
attached(ClientSnacProcessor processor)
Called when this SNAC queue manager has been set as the SNAC queue manager for the given processor. |
void |
clearQueue(ClientSnacProcessor processor)
Clears all pending (queued) SNAC commands in this SNAC manager for the given SNAC processor. |
void |
detached(ClientSnacProcessor processor)
Called when this SNAC queue manager has been removed from being the SNAC queue manager for the given processor. |
void |
pause(ClientSnacProcessor processor)
A method called to indicate that the queue should be paused until a call to unpause(net.kano.joscar.snac.ClientSnacProcessor). |
void |
queueSnac(ClientSnacProcessor processor,
SnacRequest request)
Enqueues the given SNAC request for the given SNAC processor. |
protected static void |
sendSnac(ClientSnacProcessor processor,
SnacRequest req)
Sends the given SNAC request over the given processor, bypassing the queue. |
void |
unpause(ClientSnacProcessor processor)
A method called to indicate that the queue for the given SNAC processor can once again send SNACs. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ImmediateSnacQueueManager()
| Method Detail |
public void attached(ClientSnacProcessor processor)
SnacQueueManager
attached in interface SnacQueueManagerprocessor - the SNAC processor for which this manager has been setpublic void detached(ClientSnacProcessor processor)
SnacQueueManagerattached.
detached in interface SnacQueueManagerprocessor - the SNAC processor for which this manager has been setpublic void pause(ClientSnacProcessor processor)
SnacQueueManagerSnacQueueManager.unpause(net.kano.joscar.snac.ClientSnacProcessor). This method will never be called for a given
ClientSnacProcessor twice without a call to
unpause in between; that is, it will never be called twice
in a row. Note that calls to SnacQueueManager.queueSnac(net.kano.joscar.snac.ClientSnacProcessor, net.kano.joscar.snac.SnacRequest) can and probably will be
made before a call to SnacQueueManager.unpause(net.kano.joscar.snac.ClientSnacProcessor); that is, the queue must still
accept the queueing of SNAC commands while it is paused.
pause in interface SnacQueueManagerprocessor - the SNAC processor on which to pausepublic void unpause(ClientSnacProcessor processor)
SnacQueueManagerSnacQueueManager.pause(net.kano.joscar.snac.ClientSnacProcessor), and will never be called twice for a SNAC processor
without a call to SnacQueueManager.pause(net.kano.joscar.snac.ClientSnacProcessor) in between; that is, essentially, it
will never be called twice in a row for a given SNAC processor.
unpause in interface SnacQueueManagerprocessor - the SNAC processor on which to pause
protected static final void sendSnac(ClientSnacProcessor processor,
SnacRequest req)
processor - the SNAC processor on which to sendreq - the request to send
public void queueSnac(ClientSnacProcessor processor,
SnacRequest request)
SnacQueueManagersendSnac) as it can enqueue it to be sent later. Note that
the given request will not be sent at all until it is sent from
this SNAC queue manager using sendSnac. It is not
recommended that a request be modified before it is sent.
queueSnac in interface SnacQueueManagerprocessor - the SNAC processor on which the given request was
created and on which it is to be sentrequest - the request being enqueuedpublic void clearQueue(ClientSnacProcessor processor)
SnacQueueManagerSnacQueueManager.unpause(net.kano.joscar.snac.ClientSnacProcessor) for the given SNAC processor as well,
although no queued SNACs should be sent (as they might be with an actual
call to unpause}.
clearQueue in interface SnacQueueManagerprocessor - the SNAC processor for which pending SNACs should be
erased
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||