com.voidsearch.voidbase.apps.feedq.connector.fetcher
Class HttpFeedFetcher

java.lang.Object
  extended by com.voidsearch.voidbase.client.VoidBaseHttpClient
      extended by com.voidsearch.voidbase.apps.feedq.connector.fetcher.HttpFeedFetcher
All Implemented Interfaces:
FeedFetcher, VoidBaseClient

public class HttpFeedFetcher
extends VoidBaseHttpClient
implements FeedFetcher


Field Summary
 
Fields inherited from class com.voidsearch.voidbase.client.VoidBaseHttpClient
client, hostname, module
 
Constructor Summary
HttpFeedFetcher()
           
 
Method Summary
 FeedResource fetch(java.lang.String resourceName)
          fetch the entire content of resource and factor a appropriate FeedResource
 byte[] fetchRaw(java.lang.String resource)
          get default-size byte array from the given resource
 byte[] fetchRaw(java.lang.String resource, int size)
          Http-specific tail reader - need to fetch entire content and return last size bytes
 
Methods inherited from class com.voidsearch.voidbase.client.VoidBaseHttpClient
get, get, post
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpFeedFetcher

public HttpFeedFetcher()
Method Detail

fetchRaw

public byte[] fetchRaw(java.lang.String resource)
                throws java.lang.Exception
get default-size byte array from the given resource

Specified by:
fetchRaw in interface FeedFetcher
Parameters:
resource - resource to fetch
Returns:
Throws:
java.lang.Exception

fetchRaw

public byte[] fetchRaw(java.lang.String resource,
                       int size)
                throws java.lang.Exception
Http-specific tail reader - need to fetch entire content and return last size bytes

Specified by:
fetchRaw in interface FeedFetcher
Parameters:
resource - resource to fetch
size - buffer size to fetch
Returns:
Throws:
java.lang.Exception

fetch

public FeedResource fetch(java.lang.String resourceName)
                   throws java.lang.Exception
Description copied from interface: FeedFetcher
fetch the entire content of resource and factor a appropriate FeedResource

Specified by:
fetch in interface FeedFetcher
Parameters:
resource -
Returns:
Throws:
java.lang.Exception


Copyright © 2009. All Rights Reserved.