summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SemanticHandler.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Generate c++ code from final 0-10 specGordon Sim2008-04-241-195/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@651423 13f79535-47bb-0310-9956-ffa450edef68
* QPID-920: converted c++ client to use final 0-10 protocolGordon Sim2008-04-201-3/+2
| | | | | | | | | | * connection handler converted to using invoker & proxy and updated to final method defs * SessionCore & ExecutionHandler replace by SessionImpl * simplified handling of completion & results, removed handling of responses git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@649915 13f79535-47bb-0310-9956-ffa450edef68
* - Refactored RefCounted class to avoid virtual inheritanceAndrew Stitcher2008-03-241-0/+1
| | | | | | | | | | - Removed extraneous includes and definitions from RefCounted.h - Fixed all the places that were relying on RefCounted.h to be including the intrusive_ptr header file and were assuming that something had imported intrusive_ptr into the qpid namespace git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@640479 13f79535-47bb-0310-9956-ffa450edef68
* Some refactoring of the 0-10 codepath (being migrated to final spec) that ↵Gordon Sim2008-02-251-10/+4
| | | | | | primarily colocates the current session and execution layers to facilitate implementing the new session layer that will now encompass this behaviour. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@630934 13f79535-47bb-0310-9956-ffa450edef68
* Start moving towards final 0-10 spec:Gordon Sim2008-02-211-3/+2
| | | | | | | | | | | | | * marked preview spec as 99-0 to distinguish it from 0-10 (which will now be used for the final version) * modified python client to treat 99-0 as 0-10 for now * modified broker to have two paths for the two different versions: 99-0 uses PreviewConnection, PreviewConnectionHandler and PreviewSessionHandler which are straight copy & pastes of the Connection, ConnectionHandler and SessionHandler now associated with 0-10 (so we can migrate the 0-10 path to the final spec without affecting clients working with the preview version) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@629883 13f79535-47bb-0310-9956-ffa450edef68
* Some fixes relating to message 'staging'.Gordon Sim2007-12-131-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@603973 13f79535-47bb-0310-9956-ffa450edef68
* Changes to threading: queues serialiser removed, io threads used to drive ↵Gordon Sim2007-11-291-3/+0
| | | | | | | | | | dispatch to consumers Fix to PersistableMessage: use correct lock when accessing synclist, don't hold enqueue lock when notifying queues git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@599395 13f79535-47bb-0310-9956-ffa450edef68
* Replaced shared_ptr with intrusive_ptr for qpid::Broker::Message.Alan Conway2007-11-141-1/+1
| | | | | | | Gives 9% reduction in broker heap use (perftest --count 100000.) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@595056 13f79535-47bb-0310-9956-ffa450edef68
* Change to avoid assertion when delivery is concurrent with session detachment:Gordon Sim2007-11-121-4/+8
| | | | | | | | | | | | * in SessionState::getHandler() doesn't assert and just return pointer * do assertion internally in SessionState where getHandler was relied for this before * in SemanticHandler::deliver() get handler and check it; if null then dump the message and print an error git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594233 13f79535-47bb-0310-9956-ffa450edef68
* - enable the ability to lazy load from async storeCarl C. Trieloff2007-11-081-1/+1
| | | | | | | | | | - the ci has a raw ptr for Queue in QueuedMessage, if any has any concerns, ping me and I will convert it to an auto_ptr Carl. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@593251 13f79535-47bb-0310-9956-ffa450edef68
* Sending of results must be synchronised w.r.t. other frames (e.g. message ↵Gordon Sim2007-11-021-0/+1
| | | | | | delivery). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@591320 13f79535-47bb-0310-9956-ffa450edef68
* Session resume support in client & broker: Client can resume a sessionAlan Conway2007-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | after voluntary suspend() or network failure. Frames lost in network failure are automatically re-transmitted for transparent re-connection. client::Session improvements: - Locking to avoid races between network & user threads. - Replaced client::StateManager with sys::StateMonitor - avoid heap allocation. qpid::Exception clean up: - use QPID_MSG consistently to format exception messages. - throw typed exceptions (in reply_exceptions.h) for AMQP exceptions. - re-throw correct typed exception on client for exceptions from broker. - Removed QpidError.h rubygen/templates/constants.rb: - constants.h: Added FOO_CLASS_ID and FOO_BAR_METHOD_ID constants. - reply_constants.h: Added throwReplyException(code, text) log::Logger: - Fixed shutdown race in Statement::~Initializer() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@588761 13f79535-47bb-0310-9956-ffa450edef68
* * Summary: generalized Invoker visitor to all *Operations andAlan Conway2007-10-161-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | *Handler classes, client and broker. Single template free function invoke(Invocable, const AMQBody&); works for all invocable handlers. * rubygen/templates/OperationsInvoker.rb: Generates invoker visitors for all Operations classes, client and server. * src/qpid/framing/Invoker.h: Invoker base class and template invoke() function. * rubygen/templates/structs.rb: add generic invoke method template to invoke an arbitrary object with the correct memeber function. * src/qpid/framing/AMQMethodBody.cpp, .h: Removed invoke(), replaced by qpid::framing::invoke() * src/qpid/broker/SemanticHandler.cpp, ConnectionHandler.cpp: Replace AMQMethodBody::invoke with invoke() free function. * src/qpid/framing/StructHelper.h: Avoid un-necessary alloc and copy in encode/decode. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@585223 13f79535-47bb-0310-9956-ffa450edef68
* Additional tests and fixesGordon Sim2007-10-041-8/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@581957 13f79535-47bb-0310-9956-ffa450edef68
* Fixed recovery; unacked message records are now updated to hold the new ↵Gordon Sim2007-10-021-6/+0
| | | | | | | | | | command id when messages are resent. Added unit and python test as previous bug was not being picked up by the existing tests. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@581175 13f79535-47bb-0310-9956-ffa450edef68
* Minor refactoring of execution layerGordon Sim2007-09-281-1/+1
| | | | | | | | Set sync bit when session is in sync mode git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580380 13f79535-47bb-0310-9956-ffa450edef68
* Honour sync bit when processing L4 methodGordon Sim2007-09-281-2/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580266 13f79535-47bb-0310-9956-ffa450edef68
* Split broker::Session into:Alan Conway2007-09-211-13/+17
| | | | | | | | broker::SessionState: session info (uuid etc.) + handler chains. broker::SemanticState: session state for the SemanticHandler. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@578219 13f79535-47bb-0310-9956-ffa450edef68
* Moved c++ over to using the same preview file for 0-10 work as java.Gordon Sim2007-09-211-1/+0
| | | | | | | | | | Removed all channel class related code from broker as a result. Did the same for some python tests I missed earlier. Renamed ChannelAdapter to ChannelHandler. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@578167 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/broker/SemanticHandler.cpp: add assert to suspect logic for ↵Alan Conway2007-09-181-6/+5
| | | | | | | | | execution.flush * src/tests/stop_broker: Warn rather than error on qpidd.log messages. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@577072 13f79535-47bb-0310-9956-ffa450edef68
* Refactor HandlerImpl to use Session rather than CoreRefs.Alan Conway2007-09-181-46/+12
| | | | | | | Remove most uses of ChannelAdapter in broker code. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@577027 13f79535-47bb-0310-9956-ffa450edef68
* Renamed SessionAdapter as SessionHandler.Alan Conway2007-09-171-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@576578 13f79535-47bb-0310-9956-ffa450edef68
* Handle asynchronous enqueue of messages.Gordon Sim2007-09-141-21/+21
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@575689 13f79535-47bb-0310-9956-ffa450edef68
* Use frameset begin/end flags for determining frameset boundaries.Gordon Sim2007-09-131-4/+5
| | | | | | | | Set frameset & segment begin/end flags for content bearing methods (i.e. messages). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@575377 13f79535-47bb-0310-9956-ffa450edef68
* * Summary:Alan Conway2007-08-311-72/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | - Moved BrokerChannel functionality into Session. - Moved ChannelHandler methods handling into SessionAdapter. - Updated all handlers to use session. (We're still using AMQP channel methods in SessionAdapter) Roles & responsibilities: Session: - represents an _open_ session, may be active or suspended. - ows all session state including handler chains. - attahced to SessionAdapter when active, not when suspended. SessionAdapter: - reprents the association of a channel with a session. - owned by Connection, kept in the session map. - channel open == SessionAdapter.getSessio() != 0 Anything that depends on attachment to a channel, connection or protocol should be in SessionAdpater. Anything that suvives a session suspend belongs in Session. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571575 13f79535-47bb-0310-9956-ffa450edef68
* Updated message.transfer encoding to use header and content segments ↵Gordon Sim2007-08-281-75/+123
| | | | | | | | | | (including new structs). Unified more between the basic and message classes messages. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570538 13f79535-47bb-0310-9956-ffa450edef68
* Refresh of transitional xml to more closely reflect latest specificationGordon Sim2007-08-211-5/+39
| | | | | | | | | Initial execution-result support (not yet handled on c++ client) Generation is now all done through the ruby code (it is a little slower at present I'm afraid, will try to speed it up over the next weeks) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568174 13f79535-47bb-0310-9956-ffa450edef68
* AMQBodies are no longer allocated on the heap and passed with shared_ptr.Alan Conway2007-08-161-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | AMQFrame contains a boost::variant of AMQHeaderBody,AMQContentBody, AMQHeatbeatBody, and MethodHolder. A variant is basically a type-safe union, it can allocate any of the types in-place. MethodHolder contains a Blob, a less sophisticated kind of variant, which can contain any of the concrete method body types. Using variants for all the method types causes outrageous compile times and bloated library symbol names. Blob lacks some of the finer features of variant and needs help from generated code. For now both are hidden to the rest of the code base behind AMQFrame and MethodBody classes so if/when we decide to settle on just one "variant" type solution we can do so. This commit touches nearly 100 files, mostly converting method signatures with shared_ptr<FooBody> to FooBody* or FooBody&, and converting stored shared_ptr<AMQBody> to AMQFrame and share_ptr<AMQMethodBody> to MethodHolder. There is one outstanding client memory leak, which I will fix in my next commit. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566822 13f79535-47bb-0310-9956-ffa450edef68
* Removed unused types: RequestId, ResponseId, MethodContext.Alan Conway2007-08-141-8/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@565821 13f79535-47bb-0310-9956-ffa450edef68
* Deleted following files that are obsolete for 0-10:Alan Conway2007-08-141-3/+3
| | | | | | | | | | | | | | | | | | | src/qpid/framing/AMQRequestBody.cpp src/qpid/framing/AMQRequestBody.h src/qpid/framing/AMQResponseBody.cpp src/qpid/framing/AMQResponseBody.h src/qpid/framing/Correlator.cpp src/qpid/framing/Correlator.h src/qpid/framing/MethodContext.cpp src/qpid/framing/Requester.cpp src/qpid/framing/Requester.h src/qpid/framing/Responder.cpp src/qpid/framing/Responder.h Made changes to support their deletion. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@565770 13f79535-47bb-0310-9956-ffa450edef68
* Broker management of message acknowledgements now runs entirely off ↵Gordon Sim2007-08-101-24/+21
| | | | | | | | | | execution layer. Flow control support. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@564611 13f79535-47bb-0310-9956-ffa450edef68
* Some restructuring of the client code: Gordon Sim2007-08-021-3/+10
| | | | | | | | | | * Introduced three separate 'handlers' for the connection, channel and execution 'layers'. * Support for asynchronous retrieval of response or completion status. * Channel methods no longer included in execution layers command id count. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562212 13f79535-47bb-0310-9956-ffa450edef68
* Use execution layer to acknowledge messages. Gordon Sim2007-07-271-6/+46
| | | | | | | | | Turn off 0-9 framing of requests and responses. Some refactoring around message delivery. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@560285 13f79535-47bb-0310-9956-ffa450edef68
* Initial support for latest approved 0-10 xml (with some transitional hacks ↵Gordon Sim2007-07-241-2/+5
| | | | | | included). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@559059 13f79535-47bb-0310-9956-ffa450edef68
* Added initial 'execution-layer' to try out methods form the 0-10 execution ↵Gordon Sim2007-07-231-5/+30
| | | | | | class. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@558700 13f79535-47bb-0310-9956-ffa450edef68
* removed the need to pass MethodContext/RequestId through proxy and ↵Gordon Sim2007-07-191-0/+25
| | | | | | handler/adapter interfaces git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@557522 13f79535-47bb-0310-9956-ffa450edef68
* Some refactoring towards a more decoupled handler chain structure:Gordon Sim2007-07-171-0/+89
* Connection no longer depends on Channel; it contains a map of FrameHandler::Chains. (The construction of the chains still refers to specific handlers). * Channel is no longer tied to ChannelAdapter through inheritance. The former is independent of any particular handler chain or protocol version, the latter is still used by ConnectionAdapter and SemanticHandler in the 0-9 chain. * A DeliveryAdapter interface has been introduced as part of the separation of ChannelAdapter from Channel. This is intended to adapt from a version independent core to version specific mechanisms for sending messages. i.e. it fulfills the same role for outputs that e.g. BrokerAdapter does for inputs. (Its not perfect yet by any means but is a step on the way to the correct model I think). * The connection related methods sent over channel zero are implemented in their own adapter (ConnectionAdapter), and are entirely separate from the semantic layer. The channel control methods are still bundled with the proper semantic layer methods; they too can be separated but would have to share the request id with the semantic method handler due to the nature of the 0-9 WIP. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556846 13f79535-47bb-0310-9956-ffa450edef68