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
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAPIRequestHandler(String fileParameter, APITag[] apiTags, String... origParameters) protectedAPIRequestHandler(List<TransactionType> transactionTypes, List<String> fileParameters, APITag[] apiTags, String... origParameters) protectedAPIRequestHandler(APITag[] apiTags, String... parameters) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanprotected List<TransactionType>Some API calls (i.e.protected booleanbooleanprotected booleanisTextArea(String parameter) protected abstract org.json.simple.JSONStreamAwareprocessRequest(javax.servlet.http.HttpServletRequest request) protected org.json.simple.JSONStreamAwareprocessRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected booleanprotected booleanObtain update lock on the blockchain when a required block parameter is provided instead of read lock.protected booleanprotected booleanprotected booleanprotected boolean
-
Constructor Details
-
APIRequestHandler
-
APIRequestHandler
-
APIRequestHandler
-
-
Method Details
-
getParameters
-
getAPITags
-
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
-
getSensitiveParameters
-
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()
-