Package nxt.addons
Class RequestContext
java.lang.Object
nxt.addons.AbstractContractContext
nxt.addons.RequestContext
-
Nested Class Summary
Nested classes/interfaces inherited from class nxt.addons.AbstractContractContext
AbstractContractContext.EventSource -
Field Summary
Fields inherited from class nxt.addons.AbstractContractContext
chainById, chainByName, config, contractName, contractSetupParameters, FEE_CANNOT_CALCULATE, FEE_EXCEEDS_AMOUNT, INTERNAL_ERROR_CODE_THRESHOLD, MANAGED_ACCOUNTS_INDEX_HINT_FIELD, MESSAGE_TO_ENCRYPT_WITHOUT_SECRET_PHRASE, response, source, VALIDATE_SAME_ACCOUNT_CODE, VALIDATE_SAME_CHAIN, VALIDATE_SAME_TRANSACTION_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionRequestContext(javax.servlet.http.HttpServletRequest req, ContractRunnerConfig config, String contractName) -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAttribute(String name) getBlock()Returns the Json representation of the current blockintlonggetParameter(String name) String[]getParameterValues(String name) javax.servlet.http.HttpServletRequestintbooleanisSecure()voidremoveAttribute(String name) voidsetAttribute(String name, Object o) voidvoidsetResponse(JO response) Methods inherited from class nxt.addons.AbstractContractContext
addTriggerData, createTransaction, createTransaction, createTransaction, fullHashToId, fullHashToId, generateErrorResponse, generateInfoResponse, generateInternalErrorResponse, generateResponse, getAccount, getAccountRs, getBlockchainConstants, getBlockchainHeight, getChain, getChain, getConfig, getContext, getContractName, getContractRunnerConfigParams, getContractSetupParameters, getHash, getHash, getNetworkType, getParams, getParentChain, getPhasingAttachment, getPublicKey, getPublicKey, getPublicKey, getPublicKeyHexString, getRandomnessSource, getResponse, getSource, initRandom, isPermissionGranted, loadContract, logErrorMessage, logInfoMessage, parseAccountId, parseHexString, publicKeyToAccountId, publicKeyToAccountId, rsAccount, setContractSetupParameters, sign, toHexString, verify
-
Constructor Details
-
RequestContext
public RequestContext(javax.servlet.http.HttpServletRequest req, ContractRunnerConfig config, String contractName)
-
-
Method Details
-
getBlock
Description copied from class:AbstractContractContextReturns the Json representation of the current block- Specified by:
getBlockin classAbstractContractContext- Returns:
- the current block represented as Json
-
getRuntimeParams
- Overrides:
getRuntimeParamsin classAbstractContractContext
-
getRequest
public javax.servlet.http.HttpServletRequest getRequest() -
getAttribute
-
getAttributeNames
-
getCharacterEncoding
-
setCharacterEncoding
- Throws:
UnsupportedEncodingException
-
getContentLength
public int getContentLength() -
getContentLengthLong
public long getContentLengthLong() -
getContentType
-
getInputStream
- Throws:
IOException
-
getParameter
-
getParameterMap
-
getParameterNames
-
getParameterValues
-
getProtocol
-
getScheme
-
getServerName
-
getServerPort
public int getServerPort() -
getReader
- Throws:
IOException
-
getRemoteAddr
-
getRemoteHost
-
setAttribute
-
removeAttribute
-
getLocale
-
getLocales
-
isSecure
public boolean isSecure() -
setResponse
- Overrides:
setResponsein classAbstractContractContext
-
canSetResponse
public boolean canSetResponse()- Overrides:
canSetResponsein classAbstractContractContext
-