STOMPCMD (RPGLE)

Stomp : Commands
Details ....

Copybooks  

de STOMPSRC,STOMP_H
de STOMPSRC,SOCKET_H
de QLOG4RPG,PLOG4RPG
SrvPgm: LOG4RPG - Type Definitions public
QLOG4RPG,FDMSG
cpybk : Message
de '/usr/local/include/libc_h.rpgle'
de STOMPSRC,STOMPFRM_H
de STOMPSRC,STOMPCMD_H
de STOMPSRC,STOMPEXT_H
de STOMPSRC,STOMPEXTAH
de STOMPSRC,STOMPEXT_H
de STOMPSRC,STOMPUTL_H
de STOMPSRC,STOMPCMD_H
de STOMPSRC,STOMPFRM_H

Procedures  

stomp_command_connectexported
Connect to messaging system
stomp_command_disconnectexported
Disconnect from server
stomp_command_sendexported
Sends message
stomp_command_subscribeexported
Subscribe to queue or topic
stomp_command_unsubscribeexported
Unsubscribes from a queue or topic

Detailed Description  

This module contains procedures for the various STOMP commands.

Log entries will be written via the logger de.rpgng.stomp.command.
Author:
Mihael Schmidt
Date:
18.04.2011

Procedure Documentation  

stomp_command_connect  

Booleanstomp_command_connect(Pointer, Zeichen, Zeichen)
Connects this client to the configured messaging system with a CONNECT frame. One client can connect to exactly one system at the same time.

The returned session id will be stored in the client and can be queried with stomp_getSessionId().

Any registered extension will be called on frame creation.
Parameter:
Pointer   constClient
Zeichen (100)   const   varying   optionalUsername
Zeichen (100)   const   varying   optionalPassword
Return value:
Boolean*on = connected
*off = not connected
Exported.

stomp_command_disconnect  

voidstomp_command_disconnect(Pointer)
Sends a DISCONNECT frame to the server.

Any registered extension will be called on frame creation.
Parameter:
Pointer   constClient
Exported.

stomp_command_send  

voidstomp_command_send(Pointer, Zeichen, Pointer)
Sends a SEND frame to the server with the passed message to the passed destination (queue or topic).

The header content-length will always be added to the frame.

Any registered extension will be called on frame creation.
Parameter:
Pointer   constClient
Zeichen (100)   const   varyingDestination (queue or topic)
Pointer   constMessage (null-terminated)
Exported.

stomp_command_subscribe  

voidstomp_command_subscribe(Pointer, Zeichen)
Subscribes this client to the passed destination (queue or topic).

Any registered extension will be called on frame creation.
Parameter:
Pointer   constClient
Zeichen (100)   const   varyingDestination (queue or topic)
Exported.

stomp_command_unsubscribe  

voidstomp_command_unsubscribe(Pointer, Zeichen)
Sends an UNSUBSCRIBE frame to the server.

Any registered extension will be called on frame creation.
Parameter:
Pointer   constClient
Zeichen (100)   const   varyingDestination (queue or topic)
Exported.