The cl-stomp Reference Manual

This is the cl-stomp Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:25:19 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-stomp

Implements the STOMP protocol for connecting to a message broker.

Author

Keith Irwin, Matt Reklaitis

License

MIT-style License

Dependencies
  • usocket (system).
  • babel (system).
  • bordeaux-threads (system).
Source

cl-stomp.asd.

Child Component

cl-stomp.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-stomp/cl-stomp.asd

Source

cl-stomp.asd.

Parent Component

cl-stomp (system).

ASDF Systems

cl-stomp.


3.1.2 cl-stomp/cl-stomp.lisp

Source

cl-stomp.asd.

Parent Component

cl-stomp (system).

Packages

cl-stomp.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-stomp

Source

cl-stomp.lisp.

Nickname

stomp

Use List
  • common-lisp.
  • common-lisp-user.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: make-connection (host port &key key-mapping-strategy)
Package

cl-stomp.

Source

cl-stomp.lisp.


5.1.2 Generic functions

Generic Function: ack (connection frame &optional transaction)

Send the client an ACK for frame.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: ack ((conn connection) (for-frame frame) &optional transaction)

Send the client ack for FRAME and optional TRANSACTION

Generic Function: begin (connection transaction)

Start a transaction with the given name.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: begin ((conn connection) (transaction string))

Begin a transaction with name TRANSACTION

Generic Function: commit (connection transaction)

Commit a transaction with the given name.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: commit ((conn connection) (transaction string))

Commit a transaction with name TRANSACTION

Generic Reader: frame-body (object)
Package

cl-stomp.

Methods
Reader Method: frame-body ((frame frame))

automatically generated reader method

Source

cl-stomp.lisp.

Target Slot

body.

Generic Writer: (setf frame-body) (object)
Package

cl-stomp.

Methods
Writer Method: (setf frame-body) ((frame frame))

automatically generated writer method

Source

cl-stomp.lisp.

Target Slot

body.

Generic Reader: frame-headers (object)
Package

cl-stomp.

Methods
Reader Method: frame-headers ((frame frame))

automatically generated reader method

Source

cl-stomp.lisp.

Target Slot

headers.

Generic Writer: (setf frame-headers) (object)
Package

cl-stomp.

Methods
Writer Method: (setf frame-headers) ((frame frame))

automatically generated writer method

Source

cl-stomp.lisp.

Target Slot

headers.

Generic Reader: frame-name (object)
Package

cl-stomp.

Methods
Reader Method: frame-name ((frame frame))

automatically generated reader method

Source

cl-stomp.lisp.

Target Slot

name.

Generic Writer: (setf frame-name) (object)
Package

cl-stomp.

Methods
Writer Method: (setf frame-name) ((frame frame))

automatically generated writer method

Source

cl-stomp.lisp.

Target Slot

name.

Generic Function: get-destination (frame)

Return the destination header for FRAME.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: get-destination ((frame frame))

Return the destination header for FRAME.

Generic Function: get-header (frame key)

Return the value of the header named KEY, or NIL if it doesn’t exist.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: get-header ((frame frame) (key string))

Return the value of the header named KEY, or NIL if it doesn’t exist.

Generic Function: post (connection message destination &optional headers)

Post a message to a destination.
HEADERS is an alist of header name and value pairs.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: post ((conn connection) (message string) (destination string) &optional headers)
Generic Function: register (connection callback destination &key selector id client-ack?)

Register a listener for messages to a destination.
CALLBACK should be a function which accepts a frame argument. SELECTOR can be used to provide an SQL 92 selector for filtering messages. An ID may be given for later use with UNREGISTER-ID to support overlapping subscriptions using selectors with the same destination. If CLIENT-ACK? is T, the client is responsible for sending ACK.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: register ((conn connection) callback (destination string) &key selector id client-ack?)

Register a callback for a destination. A subscription to the destination using the optional client-ack? is issued for all callbacks as part of connecting to the MQ server.

Generic Function: register-error (connection callback)

Register a listener for STOMP error frames.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: register-error ((conn connection) callback)

Register an error callback for STOMP error frames.

Generic Function: rollback (connection transaction)

Abort a transaction with the given name.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: rollback ((conn connection) (transaction string))

Abort a transaction with name TRANSACTION.

Generic Function: set-destination (frame destination)

Set the destination header for FRAME.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: set-destination ((frame frame) (destination string))

Set the destination header for FRAME.

Generic Function: set-header (frame key value)

Add a header named KEY to FRAME with VALUE.
If the header already exists, VALUE replaces the existing value.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: set-header ((frame frame) (key string) value)

Add a header named KEY to FRAME with VALUE, which can be of any type. If the header already exists, VALUE replaces the existing value.

Generic Function: start (connection &key username passcode)

Start listening for messages from STOMP.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: start ((conn connection) &key username passcode)

Connects to the message broker, sends subscriptions for any existing registrations, and enters a receive loop.

Generic Function: stop (connection)

Stop the connection with STOMP.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: stop ((conn connection))

Gracefully terminates the current receive loop and closes the connection to the message broker.

Generic Function: subscribe (connection destination &key selector id client-ack?)

Subscribe to a topic or queue.
SELECTOR can be used to provide an SQL 92 selector for filtering messages. An ID may be given for later use with UNSUBSCRIBE-ID to support overlapping subscriptions using selectors with the same destination.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: subscribe ((conn connection) (destination string) &key selector id client-ack?)
Generic Function: unregister-id (connection id)

Unregister a callback by id.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: unregister-id ((conn connection) id)
Generic Function: unsubscribe (connection destination)

Unsubscribe from a topic or queue by name.
Unsubscribing does not unregister any callbacks.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: unsubscribe ((conn connection) (destination string))
Generic Function: unsubscribe-id (connection id)

Unsubscribe from a topic or queue by id.
Unsubscribing does not unregister any callbacks.

Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: unsubscribe-id ((conn connection) (id string))

5.1.3 Standalone methods

Method: print-object ((frame frame) stream)
Source

cl-stomp.lisp.


5.1.4 Classes

Class: amq-key-mapping-strategy
Package

cl-stomp.

Source

cl-stomp.lisp.

Direct methods
Class: frame
Package

cl-stomp.

Source

cl-stomp.lisp.

Direct methods
Direct slots
Slot: name
Type

string

Initform

"message"

Initargs

:name

Readers

frame-name.

Writers

(setf frame-name).

Slot: headers
Type

list

Initargs

:headers

Readers

frame-headers.

Writers

(setf frame-headers).

Slot: body
Type

string

Initform

""

Initargs

:body

Readers

frame-body.

Writers

(setf frame-body).

Class: pass-through-key-mapping-strategy
Package

cl-stomp.

Source

cl-stomp.lisp.

Direct methods

5.2 Internals


5.2.1 Special variables

Special Variable: *replacement-pairs*
Package

cl-stomp.

Source

cl-stomp.lisp.


5.2.2 Macros

Macro: sending-frame ((connection vframe name &rest headers) &body body)
Package

cl-stomp.

Source

cl-stomp.lisp.


5.2.3 Ordinary functions

Function: destination= (actual registered)

Returns T if the REGISTERED destination matches the ACTUAL destination.

Package

cl-stomp.

Source

cl-stomp.lisp.

Function: header= (header1 header2)

Case insensitive comparison function for headers.

Package

cl-stomp.

Source

cl-stomp.lisp.

Function: log-debug (fmt &rest args)
Package

cl-stomp.

Source

cl-stomp.lisp.

Function: make-frame-from-string (string connection)

Construct a frame by parsing STRING according to the STOMP protocol.

Package

cl-stomp.

Source

cl-stomp.lisp.

Function: string-left-strip (string)

Remove spaces, tabs and line enders from the beginning of a string.

Package

cl-stomp.

Source

cl-stomp.lisp.

Function: string-replace (search replace string)
Package

cl-stomp.

Source

cl-stomp.lisp.

Function: string-split (string delim)

Splits STRING at the first occurrence of DELIM and returns the substrings before and after it. If DELIM is not found in STRING, returns STRING and NIL.

Package

cl-stomp.

Source

cl-stomp.lisp.

Function: string-strip (string)

Remove spaces, tabs and line enders from both ends of a string.

Package

cl-stomp.

Source

cl-stomp.lisp.


5.2.4 Generic functions

Generic Function: apply-callbacks (conn frame)
Package

cl-stomp.

Methods
Method: apply-callbacks ((conn connection) (frame frame))

Send FRAME to any matching registered callbacks.

Source

cl-stomp.lisp.

Generic Function: connect (conn &optional username passcode)
Package

cl-stomp.

Methods
Method: connect ((conn connection) &optional username passcode)
Source

cl-stomp.lisp.

Generic Function: demangle-key (strategy key)
Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: demangle-key ((strategy amq-key-mapping-strategy) key)
Method: demangle-key ((strategy pass-through-key-mapping-strategy) key)
Generic Function: disconnect (conn)
Package

cl-stomp.

Methods
Method: disconnect ((conn connection))
Source

cl-stomp.lisp.

Generic Function: error-frame-p (frame)
Package

cl-stomp.

Methods
Method: error-frame-p ((frame frame))
Source

cl-stomp.lisp.

Generic Function: get-subscription (frame)
Package

cl-stomp.

Methods
Method: get-subscription ((frame frame))

Get the subscription header for FRAME, if one exists.

Source

cl-stomp.lisp.

Generic Function: mangle-key (strategy key)
Package

cl-stomp.

Source

cl-stomp.lisp.

Methods
Method: mangle-key ((strategy amq-key-mapping-strategy) key)
Method: mangle-key ((strategy pass-through-key-mapping-strategy) key)
Generic Function: process-receive-buffer (conn buffer)
Package

cl-stomp.

Methods
Method: process-receive-buffer ((conn connection) buffer)

Try to extract and process frame(s) from buffer. Returns unprocessed buffer.

Source

cl-stomp.lisp.

Generic Function: receive (conn)
Package

cl-stomp.

Methods
Method: receive ((conn connection))

Called whenever there’s activity on the connection stream.
Reads from the stream and returns the received buffer as a list of bytes, or NIL if the connection has been closed by the broker.

Source

cl-stomp.lisp.

Generic Function: render-frame (frame connection)
Package

cl-stomp.

Methods
Method: render-frame ((frame frame) connection)
Source

cl-stomp.lisp.

Generic Function: send (conn frame)
Package

cl-stomp.

Methods
Method: send ((conn connection) (string string))
Source

cl-stomp.lisp.

Method: send ((conn connection) (frame frame))
Source

cl-stomp.lisp.

Generic Function: set-client-ack (frame)
Package

cl-stomp.

Methods
Method: set-client-ack ((frame frame))

Specify a ’client’ ack header for FRAME.

Source

cl-stomp.lisp.

Generic Function: set-id (frame id)
Package

cl-stomp.

Methods
Method: set-id ((frame frame) (id string))

Specify an ’id’ header for FRAME.

Source

cl-stomp.lisp.

Generic Function: set-selector (frame selector)
Package

cl-stomp.

Methods
Method: set-selector ((frame frame) (selector string))

Specify a ’selector’ header for FRAME.

Source

cl-stomp.lisp.


5.2.5 Classes

Class: connection
Package

cl-stomp.

Source

cl-stomp.lisp.

Direct methods
Direct slots
Slot: host
Type

string

Initform

"localhost"

Initargs

:host

Slot: port
Type

integer

Initform

61613

Initargs

:port

Slot: stream
Package

common-lisp.

Initargs

:stream

Slot: stream-write-lock
Initform

(bordeaux-threads:make-lock)

Slot: encoding
Initform

:utf-8

Slot: registrations
Type

list

Initargs

:registrations

Slot: key-mapping-strategy
Initform

(make-instance (quote cl-stomp:pass-through-key-mapping-strategy))

Initargs

:key-mapping-strategy

Slot: error-callback
Type

(or null function)

Slot: terminate
Class: registration
Package

cl-stomp.

Source

cl-stomp.lisp.

Direct slots
Slot: callback
Type

(or null function)

Initargs

:callback

Slot: destination
Type

string

Initargs

:destination

Slot: selector
Type

(or null string)

Initargs

:selector

Slot: id
Type

(or null string)

Initargs

:id

Slot: client-ack?
Initargs

:client-ack?


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   E   F   G   H   L   M   P   R   S   U  
Index Entry  Section

(
(setf frame-body): Public generic functions
(setf frame-body): Public generic functions
(setf frame-headers): Public generic functions
(setf frame-headers): Public generic functions
(setf frame-name): Public generic functions
(setf frame-name): Public generic functions

A
ack: Public generic functions
ack: Public generic functions
apply-callbacks: Private generic functions
apply-callbacks: Private generic functions

B
begin: Public generic functions
begin: Public generic functions

C
commit: Public generic functions
commit: Public generic functions
connect: Private generic functions
connect: Private generic functions

D
demangle-key: Private generic functions
demangle-key: Private generic functions
demangle-key: Private generic functions
destination=: Private ordinary functions
disconnect: Private generic functions
disconnect: Private generic functions

E
error-frame-p: Private generic functions
error-frame-p: Private generic functions

F
frame-body: Public generic functions
frame-body: Public generic functions
frame-headers: Public generic functions
frame-headers: Public generic functions
frame-name: Public generic functions
frame-name: Public generic functions
Function, destination=: Private ordinary functions
Function, header=: Private ordinary functions
Function, log-debug: Private ordinary functions
Function, make-connection: Public ordinary functions
Function, make-frame-from-string: Private ordinary functions
Function, string-left-strip: Private ordinary functions
Function, string-replace: Private ordinary functions
Function, string-split: Private ordinary functions
Function, string-strip: Private ordinary functions

G
Generic Function, (setf frame-body): Public generic functions
Generic Function, (setf frame-headers): Public generic functions
Generic Function, (setf frame-name): Public generic functions
Generic Function, ack: Public generic functions
Generic Function, apply-callbacks: Private generic functions
Generic Function, begin: Public generic functions
Generic Function, commit: Public generic functions
Generic Function, connect: Private generic functions
Generic Function, demangle-key: Private generic functions
Generic Function, disconnect: Private generic functions
Generic Function, error-frame-p: Private generic functions
Generic Function, frame-body: Public generic functions
Generic Function, frame-headers: Public generic functions
Generic Function, frame-name: Public generic functions
Generic Function, get-destination: Public generic functions
Generic Function, get-header: Public generic functions
Generic Function, get-subscription: Private generic functions
Generic Function, mangle-key: Private generic functions
Generic Function, post: Public generic functions
Generic Function, process-receive-buffer: Private generic functions
Generic Function, receive: Private generic functions
Generic Function, register: Public generic functions
Generic Function, register-error: Public generic functions
Generic Function, render-frame: Private generic functions
Generic Function, rollback: Public generic functions
Generic Function, send: Private generic functions
Generic Function, set-client-ack: Private generic functions
Generic Function, set-destination: Public generic functions
Generic Function, set-header: Public generic functions
Generic Function, set-id: Private generic functions
Generic Function, set-selector: Private generic functions
Generic Function, start: Public generic functions
Generic Function, stop: Public generic functions
Generic Function, subscribe: Public generic functions
Generic Function, unregister-id: Public generic functions
Generic Function, unsubscribe: Public generic functions
Generic Function, unsubscribe-id: Public generic functions
get-destination: Public generic functions
get-destination: Public generic functions
get-header: Public generic functions
get-header: Public generic functions
get-subscription: Private generic functions
get-subscription: Private generic functions

H
header=: Private ordinary functions

L
log-debug: Private ordinary functions

M
Macro, sending-frame: Private macros
make-connection: Public ordinary functions
make-frame-from-string: Private ordinary functions
mangle-key: Private generic functions
mangle-key: Private generic functions
mangle-key: Private generic functions
Method, (setf frame-body): Public generic functions
Method, (setf frame-headers): Public generic functions
Method, (setf frame-name): Public generic functions
Method, ack: Public generic functions
Method, apply-callbacks: Private generic functions
Method, begin: Public generic functions
Method, commit: Public generic functions
Method, connect: Private generic functions
Method, demangle-key: Private generic functions
Method, demangle-key: Private generic functions
Method, disconnect: Private generic functions
Method, error-frame-p: Private generic functions
Method, frame-body: Public generic functions
Method, frame-headers: Public generic functions
Method, frame-name: Public generic functions
Method, get-destination: Public generic functions
Method, get-header: Public generic functions
Method, get-subscription: Private generic functions
Method, mangle-key: Private generic functions
Method, mangle-key: Private generic functions
Method, post: Public generic functions
Method, print-object: Public standalone methods
Method, process-receive-buffer: Private generic functions
Method, receive: Private generic functions
Method, register: Public generic functions
Method, register-error: Public generic functions
Method, render-frame: Private generic functions
Method, rollback: Public generic functions
Method, send: Private generic functions
Method, send: Private generic functions
Method, set-client-ack: Private generic functions
Method, set-destination: Public generic functions
Method, set-header: Public generic functions
Method, set-id: Private generic functions
Method, set-selector: Private generic functions
Method, start: Public generic functions
Method, stop: Public generic functions
Method, subscribe: Public generic functions
Method, unregister-id: Public generic functions
Method, unsubscribe: Public generic functions
Method, unsubscribe-id: Public generic functions

P
post: Public generic functions
post: Public generic functions
print-object: Public standalone methods
process-receive-buffer: Private generic functions
process-receive-buffer: Private generic functions

R
receive: Private generic functions
receive: Private generic functions
register: Public generic functions
register: Public generic functions
register-error: Public generic functions
register-error: Public generic functions
render-frame: Private generic functions
render-frame: Private generic functions
rollback: Public generic functions
rollback: Public generic functions

S
send: Private generic functions
send: Private generic functions
send: Private generic functions
sending-frame: Private macros
set-client-ack: Private generic functions
set-client-ack: Private generic functions
set-destination: Public generic functions
set-destination: Public generic functions
set-header: Public generic functions
set-header: Public generic functions
set-id: Private generic functions
set-id: Private generic functions
set-selector: Private generic functions
set-selector: Private generic functions
start: Public generic functions
start: Public generic functions
stop: Public generic functions
stop: Public generic functions
string-left-strip: Private ordinary functions
string-replace: Private ordinary functions
string-split: Private ordinary functions
string-strip: Private ordinary functions
subscribe: Public generic functions
subscribe: Public generic functions

U
unregister-id: Public generic functions
unregister-id: Public generic functions
unsubscribe: Public generic functions
unsubscribe: Public generic functions
unsubscribe-id: Public generic functions
unsubscribe-id: Public generic functions