Path: | lib/stomp_server/queue_manager.rb |
Last Update: | Fri Apr 19 07:33:57 +0000 2013 |
QueueManager is used in conjunction with a storage class. The storage class MUST implement the following two methods:
enqueue pushes a frame to the top of the queue in FIFO order. It‘s return value is ignored. enqueue must also set the message-id and add it to the frame header before inserting the frame into the queue.
dequeue removes a frame from the bottom of the queue and returns it.
does the same as enqueue, except it puts the from at the bottom of the queue
The storage class MAY implement the stop() method which can be used to do any housekeeping that needs to be done before stompserver shuts down. stop() will be called when stompserver is shut down.
The storage class MAY implement the monitor() method. monitor() should return a hash of hashes containing the queue statistics. See the file queue for an example. Statistics are available to clients in /queue/monitor.