Class: TStandardCaucusReceiveMessage

Declaration: StandardCaucus.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

TStandardCaucusReceiveMessage is used to receive a message from a caucus. The client receives a message by creating a TStandardCaucusReceiveMessage object, streaming data out of it, and destroying the object. TStandardCaucusReceiveMessage is always constructed on the stack. When the constructor returns, the member identifier is set to the sender's ID. The message type is set to the type of message that was received. Note: EMessageType of kJoin and kLeave has no data.

Instantiation:

Always allocate on the stack.

Deriving Classes:

Do not derive from this class.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TStandardCaucusReceiveMessage::TStandardCaucusReceiveMessage

TStandardCaucusReceiveMessage (TStandardCaucusMember * memberAlias, TCaucusMember :: Identifier & member, TStandardCaucusMember :: EMessageType & messageType)

Interface Category:

API.

Purpose:

Creates a new TStandardCaucusReceiveMessage to receive messages for the specified caucus member from the specified sender. Initiates a receive operation.

Calling Context:

Called by the caucus member receiving the message.

Parameters:

Return Value:

None.

Exceptions:

Throws TCaucusException::kNotInCaucus if the member has not joined or is not longer a member of the caucus. All others are passed through.

Concurrency:

Multithread safe.

Other Considerations:

Always allocate on stack. Use a separate thread for receiving messages. A receive call can block until a message is available.

Member Function: TStandardCaucusReceiveMessage::~TStandardCaucusReceiveMessage

~ TStandardCaucusReceiveMessage ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws TCaucusException::kNotInCaucus if the member has not joined or is not longer a member of the caucus. All others are passed through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TStandardCaucusReceiveMessage::operatorTStream&

operator TStream & () const

Interface Category:

API.

Purpose:

Returns the stream used to receive the message.

Calling Context:

You do not need to call this function directly. The compiler should generate a stream conversion operator for you when you stream data out of this object.

Parameters:

Return Value:

Returns the stream used to receive the message.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

There might be times when you need to explicitly call this conversion operator directly (for example, if the compiler doesn't or cannot do it for you).
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.