|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.internal.I2CPMessageQueue
net.i2p.router.client.I2CPMessageQueueImpl
class I2CPMessageQueueImpl
Contains the methods to talk to a router or client via I2CP, when both are in the same JVM. This interface contains methods to access two queues, one for transmission and one for receiving. The methods are identical to those in java.util.concurrent.BlockingQueue
Constructor Summary | |
---|---|
I2CPMessageQueueImpl(BlockingQueue<I2CPMessage> in,
BlockingQueue<I2CPMessage> out)
|
Method Summary | |
---|---|
boolean |
offer(I2CPMessage msg)
Send a message, nonblocking |
boolean |
offer(I2CPMessage msg,
long timeout)
Send a message, blocking. |
I2CPMessage |
poll()
Receive a message, nonblocking |
void |
put(I2CPMessage msg)
Send a message, blocking until space is available |
I2CPMessage |
take()
Receive a message, blocking until one is available |
Methods inherited from class net.i2p.internal.I2CPMessageQueue |
---|
close |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public I2CPMessageQueueImpl(BlockingQueue<I2CPMessage> in, BlockingQueue<I2CPMessage> out)
Method Detail |
---|
public boolean offer(I2CPMessage msg)
offer
in class I2CPMessageQueue
public boolean offer(I2CPMessage msg, long timeout) throws InterruptedException
offer
in class I2CPMessageQueue
timeout
- how long to wait for space (ms)
InterruptedException
public I2CPMessage poll()
poll
in class I2CPMessageQueue
public void put(I2CPMessage msg) throws InterruptedException
put
in class I2CPMessageQueue
InterruptedException
public I2CPMessage take() throws InterruptedException
take
in class I2CPMessageQueue
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |