Main Page Compound List File List Compound Members
tmTransactionManager Class Reference
#include <tmTransactionManager.h>
List of all members.
Detailed Description
This class manages the flow of messages from the IPC daemon (coming to it through the
tmIPCModule) that ultimately come from a Transaction Service (TS) in a mozilla based client somewhere. The message is delivered to the proper queue, where it is dealt with.
New queues get created here as clients request them.
Constructor & Destructor Documentation
virtual tmTransactionManager::~tmTransactionManager |
( |
|
) |
[virtual] |
|
|
reclaim the memory allcoated during initialization |
Member Function Documentation
nsresult tmTransactionManager::AddQueue |
( |
const char * |
aQueueType |
) |
[protected] |
|
|
If all is successful a new queue with the name provided will be created, and added to the collection of queues. It will be initialized and ready to have transactions added.
The return code comes directly from the tmVector::Add() method.
This doesn't check for the existance of a queue with this name. IF there is already a queue with this name then you will get that when using GetQueue(qName) and never get the new queue created here. A call to GetQueue(qID) will be able to get at the new queue, however you had better cache the ID.
- Returns:
- NS_ERROR_INVALID_ARG if the element passed in is null
NS_ERROR_OUT_OF_MEMORY if the collection needed to grow and the allocation of a new backing store failed.
NS_ERROR_GENERATE_SUCCESS(index) if the add was successful. The calling method can get the index of the element added by using the macro NS_ERROR_GET_CODE() on the return value. But for simple success test use NS_SUCCEEDED() on the return value.
|
tmQueue* tmTransactionManager::GetQueue |
( |
const char * |
aQueueName |
) |
[protected] |
|
|
- Returns:
- the queue with the name passed in
nsnull if there is no queue with that name
|
tmQueue* tmTransactionManager::GetQueue |
( |
PRUint32 |
aQueueID |
) |
[protected] |
|
|
- Returns:
- the queue indexed by the ID passed in
nsnull if the ID is bad, or there is no queue at that spot
|
void tmTransactionManager::HandleTransaction |
( |
tmTransaction * |
aTrans |
) |
|
|
|
Called from the tmIPCModule. Decide where to send the message and dispatch it. Currently you do not have to be a listener of a queue in order to post to it. This may change for security purposes.
|
nsresult tmTransactionManager::Init |
( |
|
) |
|
|
|
Set up the storage of the queues - initialize the vector
- Returns:
|
nsresult tmTransactionManager::RemoveQueue |
( |
PRUint32 |
aQueueID |
) |
[protected] |
|
|
- Returns:
- NS_ERROR_NOT_IMPLEMENTED
|
void tmTransactionManager::SendTransaction |
( |
PRUint32 |
aTMClientID, |
|
|
tmTransaction * |
aTrans |
|
) |
|
|
|
Called by the queues when they need to get a message back out to a client. Checks are made for a positive ID and a non-null transaction. |
The documentation for this class was generated from the following file:
Generated on Mon Feb 24 10:22:51 2003 for transaction manager by
1.3-rc3