Package net.sf.urlchecker.commands

Package class diagram package net.sf.urlchecker.commands
Provides All the interfaces and classes necessary to identify, verify and validate URLs inside Character streams.

See:
          Description

Interface Summary
Command The URLChecker Command interface.
 

Class Summary
AbstractCommand The default implementation of the chain of responsibility for the commands.
CheckUrlsCommand The main Command of the URLChecker using the old httpClient from jakarta commons.
CheckUrlsGeneric<T> The Abstract Generic CheckUrls Command.
CheckUrlsProcess The Class CheckUrlsProcess executes an Internet check for a given result using a configured client.
Context The Context to pass all information through the commands.
Result The Result Class.
RetryHandler The RetryHandler Class that controls the old client's retry method.
StandardContext The StandardContext Class.
URLMatchCommand The URLMatch Command.
 

Package net.sf.urlchecker.commands Description

Provides All the interfaces and classes necessary to identify, verify and validate URLs inside Character streams. Unless otherwise mentioned all classes of this package will throw Null pointer Exception if a null parameter is passed. This package contains common implementations and interfaces for both clients and specific implementations for the old client.

Use

To properly use the library try something like:
 
        ...
        builder = new CommunicationBuilder();
    resolver = new URLMatchCommand();
    resolver.setSuccessor(new URIValidateCommand());
    resolver.getSuccessor().setSuccessor(new CheckUrlsCommand());
    ...
    final InputStream inStream = this.getClass().getClassLoader()
                .getResourceAsStream("dummyData.xml");
    final Context context = new Context();
    context.setSource(inStream);

    Set results;
    try {
        context.setClient(builder.getMultithreadedClient());
                ...
                results = resolver.process(context);
                for (final Result r : results) {
                    //Do something with the results
                        System.out.println(r.toString());
                        ...
        }catch (final ConfigurationException e) {
                //Do something about the exception
        }finally{
                builder.shutdownCommunication();
        }

Extending

Implement the command interface in order to create new commands in the chain and add them to the place of the chain that fits your needs.



Copyright © 2010 Nikolaos Georgosopoulos. All Rights Reserved.