Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
None.
Inherited By:
TFunctionConnection
TMemberFunctionConnection
TRequestBasedMemberFunctionConnection
Purpose:
The abstract base class for instances that provide a connection from MNotifier to a notification receiver. TNotifier Connection dispatches the notifications to the receiver instance.
Instantiation:
Deriving Classes:
TNotifierConnection is an abstract class. Derived class provide concrete implementations of the Notify member function. Overrides of the Notify member function must dispatch the notification in an implementation specific way.
Always allocate on the heap.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TNotifierConnection ()
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.
void SafeDelete ()
Interface Category:
API.
Purpose:
Safely deletes the notifier connection. The connection might be in use by the notifier and if so, the connection throws an exception.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws TStandardException(kAttemptedToDeleteConnectionWhileInUse) if the connection being deleted is in use.
Concurrency:
Multithread safe.
Other Considerations:
None.
void DeleteWhenNotInUse ()
Interface Category:
API.
Purpose:
Marks the connection to be deleted when it is no longer in use.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Connect ()
Interface Category:
API.
Purpose:
Performs a connect on the notifier and registers all of the connection's own interests with the notifier. After this point, the receiver will begin to receive notifications that match its interests.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Disconnect ()
Interface Category:
API.
Purpose:
Performs a disconnect from the notifier and removes all of the connection's own interests from the notifier's list of interests. The receiver will no longer be sent any new notifications.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool IsConnected () const
Interface Category:
API.
Purpose:
Determines if the connection has connected to the notifier.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the connection has been established.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool HasInterests () const
Interface Category:
API.
Purpose:
Determines if the connection has any interests for notifications.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the connection has been given some interests in notifications.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void AddInterest (const TInterest &)
Interface Category:
API.
Purpose:
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.
Calling Context:
Call this function directly.
Parameters:
- const TInterest & -The interest specifying which notifications to receive.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void AdoptInterest (TInterest *)
Interface Category:
API.
Purpose:
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.
Calling Context:
Call this function directly.
Parameters:
- TInterest * -The interest specifying which notifications to receive.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void RemoveInterest (const TInterest &)
Interface Category:
API.
Purpose:
Removes all the interests that match the passed-in interest. The connection will no longer get notifications that are associated with this interest.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void RemoveAllInterests ()
Interface Category:
API.
Purpose:
Removes all of the connection's interests. If the connection is connected to the notifier, then it will no longer receive any notifications. However, it is still connected to the notifier and should be disconnected before being deleted.
Calling Context:
Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TNotifierConnection::CopyConnectionInterests
virtual void CopyConnectionInterests (TCollectionOf < TInterest > &) const
Interface Category:
API.
Purpose:
Gets a copy of the connection's collection of interests.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns a copy of the connection's collection of interests through the passed in collection.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool WantsBatchNotify () const
Interface Category:
API.
Purpose:
Determines whether the connection will receive batch notifications. If the connection does not accept batch notifications, then the notifications in a batch notification are given to the connection individually.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the connection can handle the batch notification.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void SetBatchNotify (bool batchNotify =true)
Interface Category:
API.
Purpose:
The receiver can set this on the connection in order to get the batch notifications. If the connection does not accept batch notifications, then the notifications in a batch notification are given to the connection individually.
Calling Context:
Call this function directly.
Parameters:
- bool batchNotify =true -true if the receiver can handle TBatchNotifications.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Notify (const TNotification &, const TInterest &)
Interface Category:
API.
Purpose:
Called by the notifier to cause the connection to distribute the notification to the connection. The connection can then distribute the notification to its receiver object or a global receiver function.
Calling Context:
Call this function directly.
Parameters:
- const TNotification & -The notification to distribute.
- const TInterest & -The interest used to match the connections that will get the distributed notification.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
- TNotifierConnection ()
- TNotifierConnection (const TInterest & theInterest)
Interface Category:
API.
Purpose:
- Default constructor.
- Creates a connection.
Calling Context:
- Called by the stream-in operators and directly.
- Call this function directly.
Parameters:
- Takes no parameters.
- const TInterest & theInterest -The initial interest to use.
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.