/** Constructor */
  public JsonRpcOauthOnlineService() {
    super();
    // setup oauth parameters
    mParameters = new BasicHttpParams();
    HttpProtocolParams.setVersion(mParameters, HttpVersion.HTTP_1_1);
    HttpProtocolParams.setContentCharset(mParameters, HTTP.DEFAULT_CONTENT_CHARSET);
    HttpProtocolParams.setUseExpectContinue(mParameters, false);
    HttpConnectionParams.setTcpNoDelay(mParameters, true);
    HttpConnectionParams.setSocketBufferSize(mParameters, 8192);

    // Set the timeout in milliseconds until a connection is established
    int timeoutConn = 10000;
    HttpConnectionParams.setConnectionTimeout(mParameters, timeoutConn);
    // Set the default socket timeout in milliseconds for waiting for data
    int timeoutSocket = 15000;
    HttpConnectionParams.setSoTimeout(mParameters, timeoutSocket);

    // setup oauth consumer
    mConsumer =
        new CommonsHttpOAuthConsumer(
            AppSettings.getInstance().getConsumerKey(),
            AppSettings.getInstance().getConsumerSecret());
  }
 /**
  * Get JsonRpc + Oauth Server
  *
  * @see moodbile.domain.servicesfactory.AbstractOnlineService#getServer()
  */
 @Override
 protected String getServer() {
   return AppSettings.getInstance().getJsonRpcOauthServer();
 }