com.dyuproject.oauth
Class HttpPostTransport

java.lang.Object
  extended by com.dyuproject.oauth.Transport
      extended by com.dyuproject.oauth.HttpPostTransport
All Implemented Interfaces:
Signature.Listener

public final class HttpPostTransport
extends Transport

Sends the oauth request parameters via HTTP POST with application/x-www-form-urlencoded content type.

Author:
David Yu
Date created:
Jun 1, 2009

Field Summary
static HttpPostTransport DEFAULT
          The default instance.
 
Constructor Summary
HttpPostTransport()
           
 
Method Summary
static HttpPostTransport getDefault()
          Gets the default instance.
 String getMethod()
          Gets the method name of this transport.
 String getName()
          Gets the name of this transport.
 void handleOAuthParameter(String key, String value, StringBuilder buffer)
          Handles the encoded oauth key and value.
 HttpConnector.Response send(UrlEncodedParameterMap params, Endpoint ep, Token token, TokenExchange exchange, NonceAndTimestamp nts, Signature signature, HttpConnector connector)
          Sends the params to the service provided and returns the http response HttpConnector.Response.
 
Methods inherited from class com.dyuproject.oauth.Transport
appendToUrl, buildAuthUrl, buildAuthUrl, get, getAuthUrl, getAuthUrl, handleRequestParameter, putDefaults, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final HttpPostTransport DEFAULT
The default instance.

Constructor Detail

HttpPostTransport

public HttpPostTransport()
Method Detail

getDefault

public static HttpPostTransport getDefault()
Gets the default instance.


getName

public String getName()
Description copied from class: Transport
Gets the name of this transport.

Specified by:
getName in class Transport

getMethod

public String getMethod()
Description copied from class: Transport
Gets the method name of this transport.

Specified by:
getMethod in class Transport

handleOAuthParameter

public void handleOAuthParameter(String key,
                                 String value,
                                 StringBuilder buffer)
Description copied from interface: Signature.Listener
Handles the encoded oauth key and value.


send

public HttpConnector.Response send(UrlEncodedParameterMap params,
                                   Endpoint ep,
                                   Token token,
                                   TokenExchange exchange,
                                   NonceAndTimestamp nts,
                                   Signature signature,
                                   HttpConnector connector)
                            throws IOException
Description copied from class: Transport
Sends the params to the service provided and returns the http response HttpConnector.Response.

Specified by:
send in class Transport
Throws:
IOException


Copyright © 2008-2013. All Rights Reserved.