|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.spinn3r.api.BaseClient
com.spinn3r.api.LinkClient
public class LinkClient
This class is NOT threadsafe. Implementations need to ensure
thread safety by using synchronized or
java.util.concurrent constructs.
| Field Summary | |
|---|---|
static int |
CONSERVATIVE_LIMIT
|
static int |
MAX_LIMIT
|
static int |
OPTIMAL_LIMIT
|
| Fields inherited from class com.spinn3r.api.BaseClient |
|---|
ACCEPT_ENCODING_HEADER, COMMENT_HANDLER, config, DEFAULT_CONNECT_TIMEOUT, DEFAULT_HOST, DEFAULT_HTTP_KEEPALIVE, DEFAULT_MAX_REDIRECTS, DEFAULT_READ_TIMEOUT, disable_parse, FEED_HANDLER, GZIP_ENCODING, isCompressed, LINK_HANDLER, NETWORKADDRESS_CACHE_TTL, NS_API, NS_ATOM, NS_COMMENT, NS_DC, NS_FEED, NS_LINK, NS_POST, NS_SOURCE, NS_TARGET, NS_WEBLOG, PERMALINK_HANDLER, RESTART_BUFFER, results, RETRY_MAX, USER_AGENT, USER_AGENT_HEADER |
| Constructor Summary | |
|---|---|
LinkClient()
|
|
| Method Summary | |
|---|---|
void |
fetch()
|
protected int |
getConservativeLimit()
Conservative limit for items which should work in all situations (but might be slower) |
protected int |
getMaxLimit()
Return the maximum number of request per call. |
protected int |
getOptimalLimit()
Return the optimal limit for fetches. |
java.util.List<LinkItem> |
getResults()
|
java.lang.String |
getRouter()
Return the router for this client. |
protected BaseResult |
parseItem(ContentApi.Entry current)
|
protected LinkItem |
parseItem(org.w3c.dom.Element current)
Parse an individual item which might be specific to this client. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.spinn3r.api.Client |
|---|
getCallDuration, getConfig, getHost, getInputStream, getLastRequestURL, getNextRequestURL, getParseDuration, getRestartPoint, getSleepDuration, setConfig, setHost, setParseDuration, setSleepDuration |
| Field Detail |
|---|
public static int MAX_LIMIT
public static int OPTIMAL_LIMIT
public static int CONSERVATIVE_LIMIT
| Constructor Detail |
|---|
public LinkClient()
| Method Detail |
|---|
public void fetch()
throws java.io.IOException,
ParseException,
java.lang.InterruptedException
fetch in interface Clientjava.io.IOException
ParseException
java.lang.InterruptedExceptionpublic java.util.List<LinkItem> getResults()
getResults in interface Client
protected BaseResult parseItem(ContentApi.Entry current)
throws java.lang.Exception
parseItem in class BaseClientjava.lang.Exception
protected LinkItem parseItem(org.w3c.dom.Element current)
throws java.lang.Exception
BaseClient
parseItem in class BaseClientjava.lang.Exceptionprotected int getMaxLimit()
BaseClient
getMaxLimit in class BaseClientprotected int getOptimalLimit()
BaseClient
getOptimalLimit in class BaseClientprotected int getConservativeLimit()
BaseClient
getConservativeLimit in class BaseClientpublic java.lang.String getRouter()
BaseClient
getRouter in interface ClientgetRouter in class BaseClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||