@@ -274,7 +274,10 @@ func (msg *MessageImpl) GetApplName() string {
274274 return applName
275275}
276276
277- // TODO documentation
277+ // SetStringProperty enables an application to set a string-type message property.
278+ //
279+ // value is *string which allows a nil value to be specified, to unset an individual
280+ // property.
278281func (msg * MessageImpl ) SetStringProperty (name string , value * string ) jms20subset.JMSException {
279282 var retErr jms20subset.JMSException
280283
@@ -306,7 +309,8 @@ func (msg *MessageImpl) SetStringProperty(name string, value *string) jms20subse
306309 return retErr
307310}
308311
309- // TODO documentation
312+ // GetStringProperty returns the string value of a named message property.
313+ // Returns nil if the named property is not set.
310314func (msg * MessageImpl ) GetStringProperty (name string ) * string {
311315
312316 var valueStr string
@@ -337,26 +341,28 @@ func (msg *MessageImpl) GetStringProperty(name string) *string {
337341 return & valueStr
338342}
339343
340- // TODO documentation
344+ // PropertyExists returns true if the named message property exists on this message.
341345func (msg * MessageImpl ) PropertyExists (name string ) (bool , jms20subset.JMSException ) {
342346
343- found , _ , retErr := msg .getPropertyInternal (name )
347+ found , _ , retErr := msg .getPropertiesInternal (name )
344348 return found , retErr
345349
346350}
347351
348- // TODO documentation
352+ // GetPropertyNames returns a slice of strings containing the name of every message
353+ // property on this message.
354+ // Returns a zero length slice if no message properties are defined.
349355func (msg * MessageImpl ) GetPropertyNames () ([]string , jms20subset.JMSException ) {
350356
351- _ , propNames , retErr := msg .getPropertyInternal ("" )
357+ _ , propNames , retErr := msg .getPropertiesInternal ("" )
352358 return propNames , retErr
353359}
354360
355- // TODO documentation
356- // Two modes of operation ;
357- // - supply non-empty name parameter to check whether that property exists
358- // - supply empty name parameter to get a []string of all property names
359- func (msg * MessageImpl ) getPropertyInternal (name string ) (bool , []string , jms20subset.JMSException ) {
361+ // getPropertiesInternal is an internal helper function that provides a largely
362+ // identical implication for two application-facing functions ;
363+ // - PropertyExists supplies a non-empty name parameter to check whether that property exists
364+ // - GetPropertyNames supplies an empty name parameter to get a []string of all property names
365+ func (msg * MessageImpl ) getPropertiesInternal (name string ) (bool , []string , jms20subset.JMSException ) {
360366
361367 impo := ibmmq .NewMQIMPO ()
362368 pd := ibmmq .NewMQPD ()
@@ -398,7 +404,7 @@ func (msg *MessageImpl) getPropertyInternal(name string) (bool, []string, jms20s
398404 return false , propNames , nil
399405}
400406
401- // TODO documentation
407+ // ClearProperties removes all message properties from this message.
402408func (msg * MessageImpl ) ClearProperties () jms20subset.JMSException {
403409
404410 // Get the list of all property names, as we have to delete
0 commit comments