version 1.23, 2002/02/20 22:40:04
|
version 1.24, 2002/02/22 19:16:39
|
|
|
// divert legacy messages to handleEnqueue | // divert legacy messages to handleEnqueue |
if ( ! (rq->getMask() & message_mask::ha_async) ) | if ( ! (rq->getMask() & message_mask::ha_async) ) |
{ | { |
|
|
rq = operation->_request.remove_first() ; | rq = operation->_request.remove_first() ; |
operation->unlock(); | operation->unlock(); |
// delete the op node | // delete the op node |
delete operation; | delete operation; |
handleEnqueue(rq); |
|
|
// Attn: change to handleEnqueue(msg) when we have that method in all messagequeueservices |
|
// make handleEnqueue pure virtual !!! |
|
// << Fri Feb 22 13:39:09 2002 mdd >> |
|
|
|
enqueue(rq); |
return; | return; |
} | } |
| |
|
|
0); | 0); |
return true; | return true; |
} | } |
return false; |
|
| |
// ensure that the destination queue is in response->dest | // ensure that the destination queue is in response->dest |
// return SendForget(response); |
return SendForget(response); |
| |
} | } |
| |
|
|
if (_incoming_queue_shutdown.value() > 0 ) | if (_incoming_queue_shutdown.value() > 0 ) |
return false; | return false; |
return true; | return true; |
|
|
} | } |
| |
| |
void MessageQueueService::handleEnqueue(Message *msg) | void MessageQueueService::handleEnqueue(Message *msg) |
{ | { |
| |
|
|
if ( msg ) | if ( msg ) |
delete msg; | delete msg; |
|
|
} | } |
| |
| |
void MessageQueueService::handleEnqueue(void) | void MessageQueueService::handleEnqueue(void) |
{ | { |
|
|
Message *msg = dequeue(); | Message *msg = dequeue(); |
handleEnqueue(msg); | handleEnqueue(msg); |
} | } |
|
|
Boolean MessageQueueService::SendForget(Message *msg) | Boolean MessageQueueService::SendForget(Message *msg) |
{ | { |
| |
|
|
AsyncOpNode *op = 0; | AsyncOpNode *op = 0; |
Uint32 mask = msg->getMask(); | Uint32 mask = msg->getMask(); |
| |
|
|
if (mask & message_mask::ha_async) | if (mask & message_mask::ha_async) |
(static_cast<AsyncMessage *>(msg))->op = op; | (static_cast<AsyncMessage *>(msg))->op = op; |
} | } |
|
|
op->_flags |= ASYNC_OPFLAGS_FIRE_AND_FORGET; | op->_flags |= ASYNC_OPFLAGS_FIRE_AND_FORGET; |
op->_flags &= ~(ASYNC_OPFLAGS_CALLBACK | ASYNC_OPFLAGS_SIMPLE_STATUS); | op->_flags &= ~(ASYNC_OPFLAGS_CALLBACK | ASYNC_OPFLAGS_SIMPLE_STATUS); |
op->_state &= ~ASYNC_OPSTATE_COMPLETE; | op->_state &= ~ASYNC_OPSTATE_COMPLETE; |
| |
// get the queue handle for the destination | // get the queue handle for the destination |
if ( 0 == (op->_op_dest = MessageQueue::lookup(msg->dest))) | if ( 0 == (op->_op_dest = MessageQueue::lookup(msg->dest))) |
|
{ |
return false; | return false; |
|
} |
| |
// now see if the meta dispatcher will take it | // now see if the meta dispatcher will take it |
return _meta_dispatcher->route_async(op); |
Boolean return_code = _meta_dispatcher->route_async(op); |
|
return return_code; |
|
|
|
|
} | } |
| |
| |