Class: TRequestProcessor

Declaration: RequestProcessor.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

TRequestQueue

Purpose:

TRequestProcessor provides the abstract interface for posting requests, via the AdoptRequest function. It is designed to present a request-posting interface that crosses a thread boundary: AdoptRequest typically just accepts the request and returns; in any case, the request shall not synchronously handle the request (call TRequest::Do) directly from the invocation of AdoptRequest. (Note: This guarantee is significant to assure that an implementation doesn't surprise clients, e.g., by reentering their monitors.)

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TRequestProcessor::~TRequestProcessor

virtual ~ TRequestProcessor ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object. You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::AdoptRequest

virtual void AdoptRequest (TRequest * request)

Interface Category:

API.

Purpose:

Adopts a request and places it on its request queue to be sent out.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::IsSameRequestProcessorAs

bool IsSameRequestProcessorAs (const TRequestProcessor & another) const

Interface Category:

API.

Purpose:

IsSameRequestProcessorAs is for advanced clients who want to compare two abstract TRequestProcessors to see if they can be considered the same.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

Returns true if the passed in request processor is the same as this one.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::TRequestProcessor

TRequestProcessor ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by the stream-in operators and directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::GetActualRequestProcessor

virtual const TRequestProcessor * GetActualRequestProcessor () const

Interface Category:

API.

Purpose:

GetActualRequestProcessor (protected) is used by advanced derived classes to control the behavior of IsSameRequestProcessorAs. It returns a TRequestProcessor pointer that is used (via pointer comparison) to determine the sameness. The default implementation returns 'this'; advanced derived classes that defer processing to other processor instances may want to override this.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::RemoveExceptionHandler

virtual void RemoveExceptionHandler (const TRequestExceptionHandler &)

Interface Category:

API.

Purpose:

Removes a previously added exception handle from the request processor.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::AddExceptionHandlerAfter

virtual void AddExceptionHandlerAfter (const TRequestExceptionHandler & after, TRequestExceptionHandler *)

Interface Category:

API.

Purpose:

Adds a TRequestExceptionHandler after an existing handler. This handler is called after the existing handler, if no previous handler handles the exception.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::AddExceptionHandlerBefore

virtual void AddExceptionHandlerBefore (const TRequestExceptionHandler & before, TRequestExceptionHandler *)

Interface Category:

API.

Purpose:

Adds a TRequestExceptionHandler before an existing handler. This handler is called before the existing handler, if no previous handler handles the exception.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::AddExceptionHandlerLast

virtual void AddExceptionHandlerLast (TRequestExceptionHandler *)

Interface Category:

API.

Purpose:

Adds a TRequestExceptionHandler before as the last handler to handle exceptions caught by the request processor. This handler is called if no previous handler handles the exception.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::AddExceptionHandlerFirst

virtual void AddExceptionHandlerFirst (TRequestExceptionHandler *)

Interface Category:

API.

Purpose:

Adds a TRequestExceptionHandler before as the first handler to handle exceptions caught by the request processor. This handler is called first to handle exceptions caught by the request processor, unless another handler is subsequently added before it.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestProcessor::SetRequestQueueObserver

virtual TRequestQueueObserver * SetRequestQueueObserver (TRequestQueueObserver * observerToAlias)

Interface Category:

API.

Purpose:

Sets a request queue observer to observe requests.

Calling Context:

You can call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.