com.sun.jini.fiddler
Class FiddlerImpl.RemoveLocatorsTask

java.lang.Object
  extended by com.sun.jini.fiddler.FiddlerImpl.RemoveLocatorsTask
All Implemented Interfaces:
TaskManager.Task, Runnable
Enclosing class:
FiddlerImpl

private final class FiddlerImpl.RemoveLocatorsTask
extends Object
implements TaskManager.Task

This class represents a Task object that is placed in the TaskManager queue for processing in the thread pool. Instances of this class are placed on the task queue when a registration has requested the removal of a set of locators from the current set of locators to discover for it.


Field Summary
 LookupLocator[] locators
          The locators to remove from the registration's old set
 FiddlerImpl.RegistrationInfo regInfo
          Data structure record of the registration that made the request
 
Constructor Summary
FiddlerImpl.RemoveLocatorsTask(FiddlerImpl.RegistrationInfo regInfo, LookupLocator[] locators)
          Constructs an instance of this class and stores the input
 
Method Summary
private  void removeRegInfoLocators(FiddlerImpl.RegistrationInfo regInfo, LookupLocator[] locators)
          Removes the elements of the given set from the given registration's current set of locators to discover.
 void run()
           
 boolean runAfter(List tasks, int size)
          This method returns true if the current instance of this class must be run after at least one task in the input task list with an index less than the size parameter (size may be less than tasks.size()).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regInfo

public final FiddlerImpl.RegistrationInfo regInfo
Data structure record of the registration that made the request


locators

public final LookupLocator[] locators
The locators to remove from the registration's old set

Constructor Detail

FiddlerImpl.RemoveLocatorsTask

public FiddlerImpl.RemoveLocatorsTask(FiddlerImpl.RegistrationInfo regInfo,
                                      LookupLocator[] locators)
Constructs an instance of this class and stores the input

Method Detail

run

public void run()
Specified by:
run in interface Runnable

removeRegInfoLocators

private void removeRegInfoLocators(FiddlerImpl.RegistrationInfo regInfo,
                                   LookupLocator[] locators)
Removes the elements of the given set from the given registration's current set of locators to discover.


runAfter

public boolean runAfter(List tasks,
                        int size)
This method returns true if the current instance of this class must be run after at least one task in the input task list with an index less than the size parameter (size may be less than tasks.size()).

Note that using List.get will be more efficient than List.iterator.

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


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