|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.urlchecker.commands.AbstractCommand net.sf.urlchecker.commands.URLMatchCommand
public class URLMatchCommand
The URLMatch Command. It extracts URLs from the input stream using the
regular expression PATTERN configured in the configuration file and if none
defined the
GenericCommunicationFactory.DEFAULT_PATTERN
$Id: URLMatchCommand.java 182 2010-12-13 22:51:53Z georgosn $
Constructor Summary | |
---|---|
URLMatchCommand(Command successor)
Instantiates a new URL match command. |
Method Summary | |
---|---|
protected Result |
getResult(String uri)
Returns the result. |
Set<Result> |
process(Context context)
This method processes the input Context and forwards the results on to
the successor. |
Methods inherited from class net.sf.urlchecker.commands.AbstractCommand |
---|
fireEvent, getSuccessor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URLMatchCommand(Command successor)
successor
- the successorMethod Detail |
---|
protected Result getResult(String uri)
uri
- the uri
public Set<Result> process(Context context) throws org.apache.commons.configuration.ConfigurationException
Context
and forwards the results on to
the successor.
This implementation of the method simply checks if there are any
successors and passes the context. if no successor is registered for the
command then it merely returns the results from the context. The method
also fires a BasicChainEvent before sending the control to the successor
command with an END Type. This behavior allows the subclasses to
concentrate in processing the input while the rest of the package
releases all the features of event firing and handling. Events can be
fired from within subclasses but it is better not to fire END events as
this is handled here. START events though, must be fired in the
subclasses if they are needed.
process
in interface Command
process
in class AbstractCommand
context
- the input
org.apache.commons.configuration.ConfigurationException
- the configuration exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |