Class: TRequestBasedMemberFunctionConnectionTo

Declaration: Notification.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TRequestBasedMemberFunctionConnection

Inherited By:

None.

Purpose:

This is similar to the member function connection, except that that notifications are distributed to the receiver object using the object's own request queue. The advantage of this is that the receiver object is manipulated from only one thread and thus does not have to deal with any concurrency issues such as locking its data.

Instantiation:

Always allocate on the heap.

Deriving Classes:

This class is not intended for deriving.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TRequestBasedMemberFunctionConnectionTo::TRequestBasedMemberFunctionConnectionTo

  1. TRequestBasedMemberFunctionConnectionTo (AReceiver * theReceiver, TRequestProcessor * processorToUse)
  2. TRequestBasedMemberFunctionConnectionTo (AReceiver * theReceiver, TRequestProcessor * processorToUse, MemberFunction defaultFunction)
  3. TRequestBasedMemberFunctionConnectionTo (AReceiver * theReceiver, TRequestProcessor * processorToUse, MemberFunction defaultFunction, const TInterest & theInterest)
  4. TRequestBasedMemberFunctionConnectionTo ()

Interface Category:

API.

Purpose:

  1. Creates a new request based member function connection with no default notification member function pointer. The request processor is not adopted, it is aliased. The request process is used to serialize the notifications that a receiver object will get with other requests made against the object. Thus, the receiver object does not have to deal with concurrency issues.
  2. Creates a new request based member function with the specified member function to be used as the default notification handler. The request processor is not adopted, it is aliased. The request process is used to serialize the notifications that a receiver object will get with other requests made against the object. Thus, the receiver object does not have to deal with concurrency issues.
  3. Creates a new request based member function with the specified member function to be used as the default notification handler and the interest to be added as the initial interest. The request processor is not adopted, it is aliased. The request process is used to serialize the notifications that a receiver object will get with other requests made against the object. Thus, the receiver object does not have to deal with concurrency issues.
  4. Default constructor.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Call this function directly.
  4. 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: TRequestBasedMemberFunctionConnectionTo::~TRequestBasedMemberFunctionConnectionTo

virtual ~ TRequestBasedMemberFunctionConnectionTo ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestBasedMemberFunctionConnectionTo::GetReceiver

AReceiver * GetReceiver () const

Interface Category:

API.

Purpose:

Gets the object that will receive the notifications.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the receiver object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestBasedMemberFunctionConnectionTo::GetDefaultFunction

MemberFunction GetDefaultFunction () const

Interface Category:

API.

Purpose:

Gets the member function that will be invoked on the receiver to handle a notification associated with an interest that does not have its own special notification handler member function.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the default notification handler member function.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestBasedMemberFunctionConnectionTo::SetReceiver

  1. void SetReceiver (AReceiver * theReceiver)
  2. void SetReceiver (AReceiver * theReceiver, MemberFunction defaultFunction)

Interface Category:

API.

Purpose:

  1. Changes the object that will receive the notifications.
  2. Changes the object that will receive the notifications and the default notification handler member function.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestBasedMemberFunctionConnectionTo::AddInterest

  1. virtual void AddInterest (const TInterest &)
  2. void AddInterest (const TInterest &, MemberFunction)

Interface Category:

API.

Purpose:

  1. Adds an interest for a notification. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The default notification handler member function of the object will be called for notifications associated with this interest.
  2. Adds an interest for a notification. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The specified member function will be invoked against the object when notifications associated with this interest arrive.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TRequestBasedMemberFunctionConnectionTo::AdoptInterest

  1. virtual void AdoptInterest (TInterest *)
  2. void AdoptInterest (TInterest *, MemberFunction)

Interface Category:

API.

Purpose:

  1. Adopts an existing interest into the connection's own collection of interests. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The default notification handler member function of the object will be called for notifications associated with this interest.
  2. 2.Adopts an existing interest into the connection's own collection of interests. A new interest is added by a client of a notifier to express the desire to receive notifications that are generated and that are associated with this interest. If the connection is already connected to the notifier, then the receiver will immediately begin to receive the notifications associated with this interest. The specified member function will be invoked against the object when notifications associated with this interest arrive.

Calling Context:

  1. Call this function directly.
  2. 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.