-
- All Implemented Interfaces:
-
java.lang.AutoCloseable
@Component() public class FetchComponent implements AutoCloseable
Created by vincent on 17-5-1. Copyright @ 2013-2017 Platon AI. All rights reserved Fetch component
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classFetchComponent.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisActiveprivate final CoreMetricscoreMetricsprivate final ProtocolFactoryprotocolFactoryprivate final ImmutableConfigimmutableConfig
-
Constructor Summary
Constructors Constructor Description FetchComponent(CoreMetrics coreMetrics, ProtocolFactory protocolFactory, ImmutableConfig immutableConfig)
-
Method Summary
Modifier and Type Method Description final BooleangetIsActive()final CoreMetricsgetCoreMetrics()final ProtocolFactorygetProtocolFactory()final ImmutableConfiggetImmutableConfig()final WebPagefetch(String url)Fetch an url final WebPagefetch(String url, LoadOptions options)Fetch an url final WebPagefetchContent(WebPage page)Fetch a page final WebPagefetchContent(FetchEntry fetchEntry)Fetch a page final WebPagefetchContentDeferred(WebPage page)Fetch a page Unitclose()-
-
Constructor Detail
-
FetchComponent
FetchComponent(CoreMetrics coreMetrics, ProtocolFactory protocolFactory, ImmutableConfig immutableConfig)
-
-
Method Detail
-
getIsActive
final Boolean getIsActive()
-
getCoreMetrics
final CoreMetrics getCoreMetrics()
-
getProtocolFactory
final ProtocolFactory getProtocolFactory()
-
getImmutableConfig
final ImmutableConfig getImmutableConfig()
-
fetch
final WebPage fetch(String url, LoadOptions options)
Fetch an url
- Parameters:
url- The url of web page to fetchoptions- The options
-
fetchContent
final WebPage fetchContent(WebPage page)
Fetch a page
- Parameters:
page- The page to fetch
-
fetchContent
final WebPage fetchContent(FetchEntry fetchEntry)
Fetch a page
-
fetchContentDeferred
final WebPage fetchContentDeferred(WebPage page)
Fetch a page
- Parameters:
page- The page to fetch
-
-
-
-