class ParameterParser {

  Token<DelegationTokenIdentifier> delegationToken() throws IOException {
    String delegation = param(DelegationParam.NAME);
    final Token<DelegationTokenIdentifier> token = new
      Token<DelegationTokenIdentifier>();
    token.decodeFromUrlString(delegation);
    URI nnUri = URI.create(HDFS_URI_SCHEME + "://" + namenodeId());
    boolean isLogical = HAUtil.isLogicalUri(conf, nnUri);
    if (isLogical) {
      token.setService(HAUtil.buildTokenServiceForLogicalUri(nnUri,
        HDFS_URI_SCHEME));
    } else {
      token.setService(SecurityUtil.buildTokenService(nnUri));
    }
    return token;
  }

    ParameterParser(QueryStringDecoder decoder, Configuration conf);

}