LimeWire Consolidated API

com.limegroup.gnutella
Class PromotionBinderRequestorImpl

java.lang.Object
  extended by org.limewire.promotion.AbstractPromotionBinderRequestor
      extended by com.limegroup.gnutella.PromotionBinderRequestorImpl
All Implemented Interfaces:
PromotionBinderRequestor

public class PromotionBinderRequestorImpl
extends AbstractPromotionBinderRequestor


Constructor Summary
PromotionBinderRequestorImpl(PromotionBinderFactory binderFactory, LimeHttpClient exe, ApplicationServices applicationServices)
           
 
Method Summary
 String alterUrl(String url)
          Subclasses should alter the final URL in this method, such as adding version information, etc.
protected  void error(Exception e)
          Called when an Exception occurs.
protected  String getUserAgent()
          Returns the User-Agent to send along with the POST request.
protected  InputStream makeRequest(org.apache.http.client.methods.HttpPost post, org.apache.http.params.HttpParams params)
          Called once the PostMethod request is constructed.
 
Methods inherited from class org.limewire.promotion.AbstractPromotionBinderRequestor
encode, request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PromotionBinderRequestorImpl

@Inject
public PromotionBinderRequestorImpl(PromotionBinderFactory binderFactory,
                                           LimeHttpClient exe,
                                           ApplicationServices applicationServices)
Method Detail

error

protected void error(Exception e)
Description copied from class: AbstractPromotionBinderRequestor
Called when an Exception occurs.

Specified by:
error in class AbstractPromotionBinderRequestor
Parameters:
e - the Exception that occured.

getUserAgent

protected String getUserAgent()
Description copied from class: AbstractPromotionBinderRequestor
Returns the User-Agent to send along with the POST request.

Specified by:
getUserAgent in class AbstractPromotionBinderRequestor
Returns:
the User-Agent to send along with the POST request.

makeRequest

protected InputStream makeRequest(org.apache.http.client.methods.HttpPost post,
                                  org.apache.http.params.HttpParams params)
                           throws org.apache.http.HttpException,
                                  IOException
Description copied from class: AbstractPromotionBinderRequestor
Called once the PostMethod request is constructed. The purpose of the callback is so we can pass a PromotionBindder created from the PromotionBinderFactory from the passed in bytes we recieve from the request.

Specified by:
makeRequest in class AbstractPromotionBinderRequestor
Parameters:
post - POST to send to a server
Returns:
a stream for the HTTP request
Throws:
org.apache.http.HttpException - thrown when a protocol error occurs
IOException - thrown when a protocol I/O occurs

alterUrl

public String alterUrl(String url)
Description copied from class: AbstractPromotionBinderRequestor
Subclasses should alter the final URL in this method, such as adding version information, etc.

Specified by:
alterUrl in class AbstractPromotionBinderRequestor

LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.