com.sun.jini.reggie
Class RegistrarImpl.AddressTask

java.lang.Object
  extended by com.sun.jini.reggie.RegistrarImpl.AddressTask
All Implemented Interfaces:
TaskManager.Task, Runnable
Enclosing class:
RegistrarImpl

private final class RegistrarImpl.AddressTask
extends Object
implements TaskManager.Task

Address for unicast discovery response.


Field Summary
 String host
          The address
 int port
          The port
 
Constructor Summary
RegistrarImpl.AddressTask(String host, int port)
          Simple constructor
 
Method Summary
private  void attemptResponse(InetSocketAddress addr, int timeout)
          attempt a connection to multicast request client
 boolean equals(Object obj)
          Two tasks are equal if they have the same address and port
 int hashCode()
           
 void run()
          Connect and then process a unicast discovery request
 boolean runAfter(List tasks, int size)
          No ordering
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

public final String host
The address


port

public final int port
The port

Constructor Detail

RegistrarImpl.AddressTask

public RegistrarImpl.AddressTask(String host,
                                 int port)
Simple constructor

Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Two tasks are equal if they have the same address and port

Overrides:
equals in class Object

run

public void run()
Connect and then process a unicast discovery request

Specified by:
run in interface Runnable

runAfter

public boolean runAfter(List tasks,
                        int size)
No ordering

Specified by:
runAfter in interface TaskManager.Task
Parameters:
tasks - the tasks to consider. A read-only List, with all elements instanceof Task.
size - elements with index less than size should be considered

attemptResponse

private void attemptResponse(InetSocketAddress addr,
                             int timeout)
                      throws Exception
attempt a connection to multicast request client

Throws:
Exception


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.