net.sf.urlchecker.commands
Class Context

Package class diagram package Context
java.lang.Object
  extended by net.sf.urlchecker.commands.Context
Direct Known Subclasses:
StandardContext

public abstract class Context
extends Object

The Context to pass all information through the commands. The context contains the Listeners of events, the results of each stage of processing and the original source of target URLs.

$Id: Context.java 184 2010-12-17 21:23:28Z georgosn $

Version:
$LastChangedRevision: 184 $
Author:
$LastChangedBy: georgosn $

Constructor Summary
Context()
          Instantiates a new context.
 
Method Summary
 void addListener(ChainListener newListener)
          Adds the listener.
 void clearListeners()
          Clear listeners.
 boolean equals(Object obj)
          
 Set<ChainListener> getListeners()
          Returns the listeners.
 Set<Result> getResults()
          Gets the results.
 Readable getSource()
          Gets the source.
 int hashCode()
          
 boolean removeListener(ChainListener oldListener)
          Removes the listener.
 void setSource(Readable aSource)
          Sets the source.
 Iterator<Result> validResultsIterator()
          Valid results iterator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context()
Instantiates a new context.

Method Detail

addListener

public void addListener(ChainListener newListener)
Adds the listener.

Parameters:
newListener - the new listener

clearListeners

public void clearListeners()
Clear listeners.


equals

public boolean equals(Object obj)

Overrides:
equals in class Object

getListeners

public Set<ChainListener> getListeners()
Returns the listeners.

Returns:
the listeners

getResults

public Set<Result> getResults()
Gets the results.

Returns:
the results

getSource

public Readable getSource()
Gets the source.

Returns:
the source

hashCode

public int hashCode()

Overrides:
hashCode in class Object

removeListener

public boolean removeListener(ChainListener oldListener)
Removes the listener.

Parameters:
oldListener - the old listener
Returns:
true, if successful

setSource

public void setSource(Readable aSource)
Sets the source.

Parameters:
aSource - the source to set

validResultsIterator

public Iterator<Result> validResultsIterator()
Valid results iterator.

Returns:
the iterator


Copyright © 2010 Nikolaos Georgosopoulos. All Rights Reserved.