Package nxt.http

Class APIServlet.APIRequestHandler

java.lang.Object
nxt.http.APIServlet.APIRequestHandler
Direct Known Subclasses:
AddBundlingRule, AddPeer, BlacklistAPIProxyPeer, BlacklistBundler, BlacklistPeer, BootstrapAPIProxy, BroadcastTransaction, CalculateFee, CalculateFullHash, CanDeleteCurrency, ClearUnconfirmedTransactions, CombineSecret, CreateTransaction, DecodeFileToken, DecodeQRCode, DecodeToken, DecryptFrom, DeriveAccountFromMasterPublicKey, DeriveAccountFromSeed, DetectMimeType, DownloadPrunableMessage, DownloadTaggedData, DumpPeers, EncodeQRCode, EncryptTo, EvaluateExpression, EventRegister, EventWait, FullHashToId, FullReset, GenerateFileToken, GenerateToken, GetAccount, GetAccountAssetCount, GetAccountAssets, GetAccountBlockCount, GetAccountBlockIds, GetAccountBlocks, GetAccountCurrencies, GetAccountCurrencyCount, GetAccountCurrentAskOrderIds, GetAccountCurrentAskOrders, GetAccountCurrentBidOrderIds, GetAccountCurrentBidOrders, GetAccountExchangeRequests, GetAccountId, GetAccountLedger, GetAccountLedgerEntry, GetAccountLessors, GetAccountPermissions, GetAccountPhasedTransactionCount, GetAccountPhasedTransactions, GetAccountProperties, GetAccountPublicKey, GetAccountShufflings, GetAccountTaggedData, GetAlias, GetAliasCount, GetAliases, GetAliasesLike, GetAllAssets, GetAllBroadcastedTransactions, GetAllBundlerRates, GetAllCurrencies, GetAllExchanges, GetAllOpenAskOrders, GetAllOpenBidOrders, GetAllPhasingOnlyControls, GetAllPrunableMessages, GetAllShufflings, GetAllTaggedData, GetAllTrades, GetAllWaitingTransactions, GetAPIProxyReports, GetAskOrder, GetAskOrderIds, GetAskOrders, GetAsset, GetAssetAccountCount, GetAssetAccounts, GetAssetDividends, GetAssetHistory, GetAssetIds, GetAssetPhasedTransactions, GetAssetProperties, GetAssets, GetAssetsByIssuer, GetAssetTransfers, GetAssignedShufflings, GetAvailableToBuy, GetAvailableToSell, GetBalance, GetBalances, GetBidOrder, GetBidOrderIds, GetBidOrders, GetBlock, GetBlockchainStatus, GetBlockchainTransactions, GetBlockId, GetBlocks, GetBundlerRates, GetBundlers, GetBundlingOptions, GetBuyOffers, GetChainPermissions, GetChannelTaggedData, GetCoinExchangeOrder, GetCoinExchangeOrderIds, GetCoinExchangeOrders, GetCoinExchangeTrade, GetCoinExchangeTrades, GetConfiguration, GetConstants, GetContractReferences, GetCurrencies, GetCurrenciesByIssuer, GetCurrency, GetCurrencyAccountCount, GetCurrencyAccounts, GetCurrencyFounders, GetCurrencyIds, GetCurrencyPhasedTransactions, GetCurrencyTransfers, GetDataTagCount, GetDataTags, GetDataTagsLike, GetDGSExpiredPurchases, GetDGSGood, GetDGSGoods, GetDGSGoodsCount, GetDGSGoodsPurchaseCount, GetDGSGoodsPurchases, GetDGSPendingPurchases, GetDGSPurchase, GetDGSPurchaseCount, GetDGSPurchases, GetDGSTagCount, GetDGSTags, GetDGSTagsLike, GetECBlock, GetEffectiveBalance, GetEpochTime, GetExchanges, GetExchangesByExchangeRequest, GetExchangesByOffer, GetExecutedTransactions, GetExpectedAskOrders, GetExpectedAssetDeletes, GetExpectedAssetTransfers, GetExpectedBidOrders, GetExpectedBuyOffers, GetExpectedCoinExchangeOrderCancellations, GetExpectedCoinExchangeOrders, GetExpectedCurrencyTransfers, GetExpectedExchangeRequests, GetExpectedOrderCancellations, GetExpectedSellOffers, GetExpectedTransactions, GetForging, GetFundingMonitor, GetFxtTransaction, GetGuaranteedBalance, GetHashedSecretPhasedTransactions, GetHoldingShufflings, GetLastExchanges, GetLastTrades, GetLedgerMasterPublicKey, GetLinkedPhasedTransactions, GetLog, GetMintingTarget, GetMyInfo, GetNextBlockGenerators, GetOffer, GetOrderTrades, GetPeer, GetPeers, GetPhasingAssetControl, GetPhasingOnlyControl, GetPhasingPoll, GetPhasingPollVote, GetPhasingPollVotes, GetPlugins, GetPoll, GetPollResult, GetPolls, GetPollVote, GetPollVotes, GetPrunableMessage, GetPrunableMessages, GetReferencingTransactions, GetSellOffers, GetSharedKey, GetShufflers, GetShuffling, GetShufflingParticipants, GetStackTraces, GetState, GetTaggedData, GetTime, GetTrades, GetTransaction, GetTransactionBytes, GetUnconfirmedTransactionIds, GetUnconfirmedTransactions, GetVoterPhasedTransactions, Hash, HexConvert, JPLSnapshot.JPLSnapshotAPI, LongConvert, LuceneReindex, ManagePeersNetworking, ParsePhasingParams, ParseTransaction, PopOff, ProcessVoucher, ReadMessage, RebroadcastUnconfirmedTransactions, RequeueUnconfirmedTransactions, RetrievePrunedData, RetrievePrunedTransaction, RSConvert, Scan, SearchAccounts, SearchAssets, SearchCurrencies, SearchDGSGoods, SearchPolls, SearchTaggedData, SendTransaction, SetAPIProxyPeer, SetConfiguration, SetLogging, Shutdown, SignTransaction, SimulateCoinExchange, SplitSecret, StandbyShuffling.BaseAPIRequestHandler, StartBundler, StartForging, StartFundingMonitor, StartShuffler, StopBundler, StopForging, StopFundingMonitor, StopShuffler, TrimDerivedTables, VerifyPrunableMessage, VerifyTaggedData
Enclosing class:
APIServlet

public abstract static class APIServlet.APIRequestHandler extends Object
  • Constructor Details

    • APIRequestHandler

      protected APIRequestHandler(APITag[] apiTags, String... parameters)
    • APIRequestHandler

      protected APIRequestHandler(String fileParameter, APITag[] apiTags, String... origParameters)
    • APIRequestHandler

      protected APIRequestHandler(List<TransactionType> transactionTypes, List<String> fileParameters, APITag[] apiTags, String... origParameters)
  • Method Details

    • getParameters

      public final List<String> getParameters()
    • getAPITags

      public final Set<APITag> getAPITags()
    • getFileParameters

      public final List<String> getFileParameters()
    • isIgnisOnly

      public boolean isIgnisOnly()
    • processRequest

      protected abstract org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest request) throws NxtException
      Throws:
      NxtException
    • processRequest

      protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws NxtException
      Throws:
      NxtException
    • requirePost

      protected boolean requirePost()
    • startDbTransaction

      protected boolean startDbTransaction()
    • requirePassword

      protected boolean requirePassword()
    • allowRequiredBlockParameters

      protected boolean allowRequiredBlockParameters()
    • requiredBlockUpdateLock

      protected boolean requiredBlockUpdateLock()
      Obtain update lock on the blockchain when a required block parameter is provided instead of read lock. Should be set for APIs that need write lock during execution
      Returns:
      true if an update lock is to be obtained
    • requireBlockchain

      protected boolean requireBlockchain()
    • requireFullClient

      protected boolean requireFullClient()
    • isChainSpecific

      protected boolean isChainSpecific()
    • isTextArea

      protected boolean isTextArea(String parameter)
    • getSensitiveParameters

      protected List<String> getSensitiveParameters()
    • getCreateTransactionTypes

      protected List<TransactionType> getCreateTransactionTypes()
      Some API calls (i.e. CreateTransaction subclasses) create transactions. This method returns the list of possible transactions types created by this API call.
      Returns:
      the list of transaction types that this API call can create
    • canHaveRecipient

      protected boolean canHaveRecipient()