com.limegroup.gnutella
Class PromotionBinderRequestorImpl
java.lang.Object
org.limewire.promotion.AbstractPromotionBinderRequestor
com.limegroup.gnutella.PromotionBinderRequestorImpl
- All Implemented Interfaces:
- PromotionBinderRequestor
public class PromotionBinderRequestorImpl
- extends AbstractPromotionBinderRequestor
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PromotionBinderRequestorImpl
@Inject
public PromotionBinderRequestorImpl(PromotionBinderFactory binderFactory,
LimeHttpClient exe,
ApplicationServices applicationServices)
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
Copyright © 2009. All Rights Reserved.