cyrillelamal / internety

Скачать интернеты без регистрации и СМС

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internety

Скачать интернеты бесплатно без регистрации и СМС.

A sitemap builder.

How to...

See an example of usage.

fill a sitemap?

  1. Create the sitemap.
SiteMap map = new SiteMap(new URI("https://host.com/foo/start"));
  1. Create a filler.
AsynchronousFillerInterface filler = new ThreadPoolFiller(map, 4); // This implementation uses Futures

There are no reasons to use a more generic FillerInterface, but you can build your implementations for this one.

  1. Do fill.
filler.fill();

The thread will finish before the futures are completed. So you have to join them.

filler.await(); // or filler.fill().await();
  1. Get the result, e.g. print it somewhere.

Use implementations of the SerializerInterface.

SerializerInterface serializer = new TxtSerializer();

There are:

It uses the strategy pattern against site maps.

Sting result = serializer.serialize(map);

add your serializer?

Implement the SerializerInterface and use it.

add your filler?

It is highly recommended implementing the AsynchronousFillerInterface, e.g. using threads (even only one). Or you can implement the more generic FillerInterface.

create distributed or heavy sitemap?

At the moment the AsynchronousFillerInterface proposes the onBeforeTaskCreated callback which is implemented in the ThreadPoolFiller via the TaskLifecycleHandlerInterface interface.

More simply, it means that you can pass an implementation of the TaskLifecycleHandlerInterface interface to the constructor of ThreadPoolFiller. This implementation will handle inscribed URIs before launch any task and handle other URIs.

About

Скачать интернеты без регистрации и СМС


Languages

Language:Java 100.0%