Namespace: OpenEdge.Web
Class
WebHandler
Parent classes:
Progress.Lang.Object

Inherits: Progress.Lang.Object
Implements: Progress.Web.IWebHandler, OpenEdge.Logging.ISupportLogging

Copyright (c) 2015-2017 by Progress Software Corporation. All rights reserved.
Purpose:Abstract class to use as a basis for building WebSpeed for
PASOE request handlers
Author(s):mbanks
Created:Wed Jan 14 14:38:25 EST 2015
Notes:* Concrete child classes must implement the HandleNotImplemented and
HandleNotAllowedMethod methods so which are the baseline on
we control the messages back (either created entirely in ABL or
served by PASOE).
to control the way error states are handled. The default is to return
an integer status code.




Method Summary
Options Name Purpose
LOGICAL CanAcceptContentType (IWebRequest, character) /* Ensures that the request's Accept header and the operation's ContentType values are compatible, per https://tools.ietf.org/html/rfc7231#section-5.3.2 ContentType must be a complete type/subtype. Accept may contain type/subtype, type/<star> or <star>/<star> values. If <star>/<star> values appear the we can service the request. @param IWebRequest The request that resulting in the exception @param character The MIME type we're wanting to return (usally from the operation) @return logical TRUE if the operation's ContentType is compatible with the request's Accept value */
INTEGER HandleDelete (IWebRequest) /* Default handler for the HTTP DELETE method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandleException (Error, IWebRequest) /* Handles an exception that has been raised while dealing with the request @param Progress.Lang.Error The as-yet-unhandled exception @param IWebRequest The request that resulting in the exception @return integer A non-null status code use to deal with errors */
INTEGER HandleGet (IWebRequest) /* Default handler for the HTTP GET method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandleHead (IWebRequest) /* Default handler for the HTTP HEAD method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandleNotAllowedMethod (IWebRequest) /* Handler for unsupported methods @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandleNotImplemented (IWebRequest) /* Handler for unknown methods @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandleOptions (IWebRequest) /* Default handler for the HTTP OPTIONS method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandlePatch (IWebRequest) /* Default handler for the HTTP PATCH method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandlePost (IWebRequest) /* Default handler for the HTTP POST method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandlePut (IWebRequest) /* Default handler for the HTTP PUT method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
INTEGER HandleRequest () /* Handle request by calling the specific handler for the request method @return integer An HTTP status code. Zero means that the webhandler will take care of any errors. A non-zero value means that the PASOE webapp's error handling will return a standard page for the error */
INTEGER HandleTrace (IWebRequest) /* Default handler for the HTTP TRACE method @param IWebRequest The request being serviced @return integer An optional status code. A zero or null value means this method will deal with all errors */
LogMessage (character, integer) /** Logs a message @param character The message to log @param integer The level this message should be logged at */

Constructor Summary
Options Name Purpose
WebHandler () /* Default constructor */

Property Summary
Options Name Purpose
OpenEdge.Logging.ILogWriter Logger


Method Detail
Top

LOGICAL CanAcceptContentType (IWebRequest, character)

/* Ensures that the request's Accept header and the operation's
ContentType values are compatible, per https://tools.ietf.org/html/rfc7231#section-5.3.2
ContentType must be a complete type/subtype.
Accept may contain type/subtype, type/<star> or <star>/<star> values. If <star>/<star>
values appear the we can service the request.
Parameters:
pRequest OpenEdge.Web.IWebRequest
pContentType CHARACTER
Returns LOGICAL
logical TRUE if the operation's ContentType is compatible with the request's Accept value
Top

INTEGER HandleDelete (IWebRequest)

/* Default handler for the HTTP DELETE method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandleException (Error, IWebRequest)

/* Handles an exception that has been raised while dealing with the request
Parameters:
poError Progress.Lang.Error
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer A non-null status code use to deal with errors
Top

INTEGER HandleGet (IWebRequest)

/* Default handler for the HTTP GET method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandleHead (IWebRequest)

/* Default handler for the HTTP HEAD method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandleNotAllowedMethod (IWebRequest)

/* Handler for unsupported methods
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandleNotImplemented (IWebRequest)

/* Handler for unknown methods
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandleOptions (IWebRequest)

/* Default handler for the HTTP OPTIONS method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandlePatch (IWebRequest)

/* Default handler for the HTTP PATCH method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandlePost (IWebRequest)

/* Default handler for the HTTP POST method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandlePut (IWebRequest)

/* Default handler for the HTTP PUT method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

INTEGER HandleRequest ()

/* Handle request by calling the specific handler for the request method
any errors. A non-zero value means that the PASOE webapp's error handling
will return a standard page for the error
Returns INTEGER
integer An HTTP status code. Zero means that the webhandler will take care of
Top

INTEGER HandleTrace (IWebRequest)

/* Default handler for the HTTP TRACE method
method will deal with all errors
Parameters:
poRequest OpenEdge.Web.IWebRequest
Returns INTEGER
integer An optional status code. A zero or null value means this
Top

LogMessage (character, integer)

Purpose: Logs a message
Parameters:
pcMessage CHARACTER
piLogLevel INTEGER


Constructor Detail
Top

WebHandler ()

/* Default constructor


Property Detail
Top

OpenEdge.Logging.ILogWriter Logger

Returns OpenEdge.Logging.ILogWriter


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 11.7.15