|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jini.discovery.LookupDiscovery.DecodeAnnouncementTask
private class LookupDiscovery.DecodeAnnouncementTask
Task which decodes received multicast announcement packets. This is separated into a task to allow the AnnouncementListener thread to quickly loop and receive new announcement packets; the act of decoding packets may involve relatively slow cryptographic operations such as signature verification, and would impede the packet receiving loop if it were performed inline.
Field Summary | |
---|---|
private DatagramPacket |
datagram
|
Constructor Summary | |
---|---|
LookupDiscovery.DecodeAnnouncementTask(DatagramPacket datagram)
Creates a task for decoding the given multicast announcement packet. |
Method Summary | |
---|---|
private void |
doRun()
Decodes this task's multicast announcement packet. |
private boolean |
newSeqNum(long currentNum,
long oldNum)
Returns true if currentNum is a new sequence number
that needs to be inspected. |
void |
run()
Restore the privileged context and run |
boolean |
runAfter(List tasks,
int size)
No ordering |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final DatagramPacket datagram
Constructor Detail |
---|
public LookupDiscovery.DecodeAnnouncementTask(DatagramPacket datagram)
Method Detail |
---|
public void run()
run
in interface Runnable
private void doRun()
private boolean newSeqNum(long currentNum, long oldNum)
true
if currentNum is a new sequence number
that needs to be inspected. A -1 occurs if the announcement had no
sequence number (for e.g. DiscoveryV1) or the service had been
discovered through unicast discovery. REMIND: Ideally the
message should have a flag which indicates no sequence number instead
of overloading the -1 value
public boolean runAfter(List tasks, int size)
runAfter
in interface TaskManager.Task
tasks
- the tasks to consider. A read-only List, with all
elements instanceof Task.size
- elements with index less than size should be considered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |