EnsLib.REST.Service
abstract class EnsLib.REST.Service extends EnsLib.HTTP.Service, %CSP.REST, Ens.Util.JSON
REST Service class. Can use an HTTP InboundAdapter listener, or the standard CSP Service mechanism, or both. In order for the CSP mechanism to work, HTTP Services using this class must be configured with the invoking URL including ?CfgItem= giving the config item name. (Configured Services exposed using the HTTP Inbound Adapter may also be invoked with this URL parameter but because each configured Inbound Adapter listens on its own TCP/IP port this parameter is just a safety check for them.)Method Inventory
Parameters
parameter ADAPTER = EnsLib.HTTP.InboundAdapter;
Inherited description: Name of the adapter class - override this to "" if you want to use only the regular HTTP mechanism and not the custom-port HTTP InboundAdapter.
parameter EnsServicePrefix;
This prefix will be removed from the beginning of the actual URL before matching it against the UrlMap.
If this prefix begins with '^' then the CSP Application will also be removed from the beginning of the URL if this service is being invoked via the CSP gateway.
If this prefix begins with '|' then the Config Name for this service will be removed from the beginning of the URL, as well as the CSP Application if this service is being invoked via the CSP gateway.
parameter PREFIXCASESENSITIVE = 0;
Methods
Issue a '405' error ( user can override)
method OnProcessInput(pInput As %Library.AbstractStream, Output pOutput As %Stream.Object = $$$NULLOREF, ByRef pHint As %Library.String) as %Status
Override this method in your subclass if you want to handle dispatching yourself.
This implementation paraphrases the %CSP.REST:DispatchRequest() implementation with modifications to support the input and output streams used by the HTTP Adapter.
Inherited description: This method matches the request and method and calls the dispatcher
Issue an HTTP error
Inherited Members
Inherited Properties
- %AlertStartTime
- %ConfigName
- %ConfigQueueName
- %LastActionTime
- %LastHandledTime
- %LastReportedError
- %OutsideCreated
- %PreserveSession
- %ProcessInputCalled
- %QuitTask
- %RequestHeader
- %SessionId
- %SuperSession
- %SuperSessionCreatedBeforeSession
- %WaitForNextCallInterval
- %WarnedLatest
- %isShadow
- Adapter
- AlertGracePeriod
- AlertGroups
- AlertOnError
- ArchiveIO
- BusinessPartner
- CSPHeaderCharsetConvert
- CSPNoCharSetConvert
- EnableStandardRequests
- GenerateSuperSessionID
- IOLogEntry
- InactivityTimeout
- ThrottleDelay
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnClose()
- %OnNew()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %SuperSessionSet()
- %ValidateObject()
- AcceptsContentType()
- AccessCheck()
- AdapterName()
- AssignOneSetting()
- CloseIOLogEntry()
- ConvertParameter()
- Decrypt()
- DispatchRequest()
- DrawCSS3STYLE()
- DrawHEAD()
- DrawSTHEAD()
- DrawSTTitle()
- DrawSTYLE()
- DrawTitle()
- DrawTitleSection()
- Encrypt()
- EnumerateSettingsClose()
- EnumerateSettingsExecute()
- EnumerateSettingsFetch()
- Error()
- EscapeHTML()
- EscapeURL()
- ForceSessionId()
- GenerateSuperSession()
- GetAuthChallenge()
- GetDeferredResponseToken()
- GetMsgHdrRequestKey()
- GetProductionSettingValue()
- GetProductionSettings()
- GetPropertyConnections()
- GetSettings()
- GetShadowInstance()
- Http403()
- Http404()
- Http500()
- HyperEventCall()
- HyperEventHead()
- Include()
- InsertHiddenField()
- InsertHiddenFields()
- IsPrivate()
- JSONStreamToObject()
- JSONStreamToObjectArray()
- Link()
- Login()
- NewIOLogEntry()
- ObjectToJSONStream()
- OnAdapterHTTPResponse()
- OnError()
- OnErrorSetup()
- OnErrorStream()
- OnGenerateSuperSession()
- OnGetConnections()
- OnHTTPHeader()
- OnHandleCorsRequest()
- OnHandleOptionsRequest()
- OnInit()
- OnKeepalive()
- OnLoginPage()
- OnMonitor()
- OnPageError()
- OnPostHyperEvent()
- OnPreDispatch()
- OnPreHTTP()
- OnPreHyperEvent()
- OnProductionStart()
- OnProductionStop()
- OnSecurityTokenPage()
- OnTearDown()
- PopulateSuperSession()
- QueueName()
- QuoteJS()
- RewriteURL()
- SaveIOLogEntry()
- SendAlert()
- SendDeferredResponse()
- SendRequestAsync()
- SendRequestSync()
- SetResponseHeaderIfEmpty()
- ShowError()
- StartTimer()
- StatusToJSON()
- StatusToProxyObject()
- StopTimer()
- SupportedVerbs()
- ThrowError()
- UnescapeHTML()
- UnescapeURL()
- altJSONStreamToObject()
- altJSONStreamToObjectArray()
- findDataNotInQuery()
- restoreFormEncoded()
- restoreMultipart()