|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectasyncudp.QueueManager
public class QueueManager
A class allowing management of message queues for an ASyncUDP
instance.
Method Summary | |
---|---|
ASyncUDPMessageHandle |
enqueue(Message msg,
AddressPortPair app)
Enqueues the Message argument for delivery to the given
destination app . |
java.util.Set<ASyncUDPMessageQueue> |
getAllMessageQueues()
Returns all MessageQueue objects that are either sending
or have data enqueued to their respective destination addresses. |
ASyncUDPListener |
getListener()
Retrieves the listener for this ASyncUDP instance. |
ASyncUDPMessageQueue |
getMessageQueue(AddressPortPair app)
Returns the MessageQueue object associated with the given
destination. |
int |
getPortNumber()
Returns the port number on which this ASyncUDP instance is listening for new incoming datagrams. |
ASyncUDPListener |
setListener(ASyncUDPListener audpl)
Sets audpl as the listener on this ASyncUDP instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ASyncUDPMessageHandle enqueue(Message msg, AddressPortPair app)
Message
argument for delivery to the given
destination app
.
msg
- the Message
to enqueue for deliveryapp
- the address to which the message should be delivered
public ASyncUDPMessageQueue getMessageQueue(AddressPortPair app)
MessageQueue
object associated with the given
destination.
app
- the destination address to retrieve the message queue for
public java.util.Set<ASyncUDPMessageQueue> getAllMessageQueues()
MessageQueue
objects that are either sending
or have data enqueued to their respective destination addresses.
public ASyncUDPListener getListener()
null
if there is no listenerpublic ASyncUDPListener setListener(ASyncUDPListener audpl)
audpl
as the listener on this ASyncUDP instance. The
listener can later be retrieved via the getListener
method. Only one listener may be set at a time; invoking this method
causes any previous listener to be discarded. The current listener may be
discarded by passing in null
.
audpl
- the new listener for this ASyncUDP instance
public int getPortNumber()
-1
, then
this instance is not listening on any port, and only sends outgoing
datagrams.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |