BSerialObserver Class Reference
[Binder]

#include <support/Observer.h>

Inheritance diagram for BSerialObserver:

BObserver SHandler BBinder SAtom IBinder SAtom List of all members.

Detailed Description

BObserver that ensures Observed() is thread-safe.


Public Member Functions

 BSerialObserver (const SContext &context)
virtual status_t HandleMessage (const SMessage &msg)
 Subclasses override this to receive messages.
int32_t Priority () const
void SetPriority (int32_t priority)
 Get and set the (thread) priority at which we dispatch.

Protected Member Functions

virtual status_t DispatchEffect (const SValue &told)
 Turn an effect into into a series of Observed() calls.
virtual void InitAtom ()
 Called the first time a strong reference is acquired. All significant object initialization should go here.
SLockerSerialLock () const
 Manual synchronization for derived classes.
virtual ~BSerialObserver ()


Constructor & Destructor Documentation

BSerialObserver const SContext context  ) 
 

~BSerialObserver  )  [protected, virtual]
 


Member Function Documentation

status_t DispatchEffect const SValue told  )  [protected, virtual]
 

Turn an effect into into a series of Observed() calls.

Reimplemented from BObserver.

status_t HandleMessage const SMessage msg  )  [virtual]
 

Subclasses override this to receive messages.

Reimplemented from SHandler.

void InitAtom  )  [protected, virtual]
 

Called the first time a strong reference is acquired. All significant object initialization should go here.

You can override it and do any setup you need. Note that you do not need to call the SAtom implementation. (So you can derive from two different SAtom implementations and safely call down to both of their IncStrong() methods.)

See also:
IncStrong()

Reimplemented from SAtom.

int32_t Priority  )  const
 

SLocker& SerialLock  )  const [inline, protected]
 

Manual synchronization for derived classes.

Derived classes can acquire SerialLock and serialize other actions with HandleMessage/Observed (both are serialized here by using SHandler(&m_lock))

void SetPriority int32_t  priority  ) 
 

Get and set the (thread) priority at which we dispatch.

Default is B_NORMAL_PRIORITY.


The documentation for this class was generated from the following files: