lib

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionFactoryImpl

type ConnectionFactoryImpl struct {
	QMName      string
	Hostname    string
	PortNumber  int
	ChannelName string
	UserName    string
	Password    string
}

ConnectionFactoryImpl defines a struct that contains attributes for each of the key properties required to establish a connection to an IBM MQ queue manager.

The fields are defined as Public so that the struct can be initialised programmatically using whatever approach the application prefers.

func (ConnectionFactoryImpl) CreateContext

CreateContext implements the JMS method to create a connection to an IBM MQ queue manager.

type ConsumerImpl

type ConsumerImpl struct {
	// contains filtered or unexported fields
}

ConsumerImpl defines a struct that contains the necessary objects for receiving messages from a queue on an IBM MQ queue manager.

func (ConsumerImpl) Close

func (consumer ConsumerImpl) Close()

Closes the JMSConsumer, releasing any resources that were allocated on behalf of that consumer.

func (ConsumerImpl) ReceiveNoWait

func (consumer ConsumerImpl) ReceiveNoWait() (jms20subset.Message, jms20subset.JMSException)

ReceiveNoWait implements the IBM MQ logic necessary to receive a message from a Destination, or immediately return a nil Message if there is no available message to be received.

func (ConsumerImpl) ReceiveStringBodyNoWait

func (consumer ConsumerImpl) ReceiveStringBodyNoWait() (*string, jms20subset.JMSException)

ReceiveStringBodyNoWait implements the IBM MQ logic necessary to receive a message from a Destination and return its body as a string.

If no message is immediately available to be returned then a nil is returned.

type ContextImpl

type ContextImpl struct {
	// contains filtered or unexported fields
}

ContextImpl encapsulates the objects necessary to maintain an active connection to an IBM MQ queue manager.

func (ContextImpl) Close

func (ctx ContextImpl) Close()

Close this connection to the MQ queue manager, and release any resources that were allocated to support this connection.

func (ContextImpl) CreateConsumer

CreateConsumer creates a consumer object that allows an application to receive messages from the specified Destination.

func (ContextImpl) CreateConsumerWithSelector

func (ctx ContextImpl) CreateConsumerWithSelector(dest jms20subset.Destination, selector string) (jms20subset.JMSConsumer, jms20subset.JMSException)

CreateConsumer creates a consumer object that allows an application to receive messages that match the specified selector from the given Destination.

func (ContextImpl) CreateProducer

func (ctx ContextImpl) CreateProducer() *ProducerImpl

CreateProducer implements the logic necessary to create a JMSProducer object that allows messages to be sent to destinations in IBM MQ.

func (ContextImpl) CreateQueue

func (ctx ContextImpl) CreateQueue(queueName string) jms20subset.Queue

CreateQueue implements the logic necessary to create a provider-specific object representing an IBM MQ queue.

func (ContextImpl) CreateTextMessage

func (ctx ContextImpl) CreateTextMessage() jms20subset.TextMessage

CreateTextMessage is a JMS standard mechanism for creating a TextMessage.

func (ContextImpl) CreateTextMessageWithString

func (ctx ContextImpl) CreateTextMessageWithString(txt string) jms20subset.TextMessage

CreateTextMessage is a JMS standard mechanism for creating a TextMessage and initialise it with the chosen text string.

type ProducerImpl

type ProducerImpl struct {
	// contains filtered or unexported fields
}

ProducerImpl defines a struct that contains the necessary objects for sending messages to a queue on an IBM MQ queue manager.

func (*ProducerImpl) GetDeliveryMode

func (producer *ProducerImpl) GetDeliveryMode() int

GetDeliveryMode returns the current delivery mode that is set on this Producer.

func (*ProducerImpl) GetTimeToLive

func (producer *ProducerImpl) GetTimeToLive() int

GetTimeToLive returns the current time to live that is set on this Producer.

func (ProducerImpl) Send

Send a message to the specified IBM MQ queue, using the message options that are defined on this JMSProducer.

func (ProducerImpl) SendRaw

func (producer ProducerImpl) SendRaw(dest jms20subset.Destination, msg jms20subset.Message, options *int32) jms20subset.JMSException

SendRaw - send raw message

func (ProducerImpl) SendString

func (producer ProducerImpl) SendString(dest jms20subset.Destination, bodyStr string) jms20subset.JMSException

Send a TextMessage with the specified body to the specified Destination using any message options that are defined on this JMSProducer.

func (ProducerImpl) SendStringRaw

func (producer ProducerImpl) SendStringRaw(dest jms20subset.Destination, bodyStr string, options *int32) jms20subset.JMSException

SendStringRaw - send raw string message

func (*ProducerImpl) SetDeliveryMode

func (producer *ProducerImpl) SetDeliveryMode(mode int) jms20subset.JMSProducer

SetDeliveryMode contains the MQ logic necessary to store the specified delivery mode parameter inside the Producer object so that it can be applied when sending messages using this Producer.

func (*ProducerImpl) SetTimeToLive

func (producer *ProducerImpl) SetTimeToLive(timeToLive int) jms20subset.JMSProducer

SetTimeToLive contains the MQ logic necessary to store the specified time to live parameter inside the Producer object so that it can be applied when sending messages using this Producer.

type QueueImpl

type QueueImpl struct {
	// contains filtered or unexported fields
}

QueueImpl encapsulates the provider-specific attributes necessary to communicate with an IBM MQ queue.

func (QueueImpl) GetDestinationName

func (queue QueueImpl) GetDestinationName() string

GetDestinationName returns the name of the destination represented by this object.

func (QueueImpl) GetQueueName

func (queue QueueImpl) GetQueueName() string

GetQueueName returns the provider-specific name of the queue that is represented by this object.

type TextMessageImpl

type TextMessageImpl struct {
	// contains filtered or unexported fields
}

TextMessageImpl contains the IBM MQ specific attributes necessary to present a message that carries a string.

func (*TextMessageImpl) GetJMSCorrelationID

func (msg *TextMessageImpl) GetJMSCorrelationID() string

GetJMSCorrelationID retrieves the correl ID from the native MQ message descriptor field.

func (*TextMessageImpl) GetJMSDeliveryMode

func (msg *TextMessageImpl) GetJMSDeliveryMode() int

GetJMSDeliveryMode extracts the persistence setting from this message and returns it in the JMS delivery mode format.

func (*TextMessageImpl) GetJMSMessageID

func (msg *TextMessageImpl) GetJMSMessageID() string

GetJMSMessageID extracts the message ID from the native MQ message descriptor.

func (*TextMessageImpl) GetJMSReplyTo

func (msg *TextMessageImpl) GetJMSReplyTo() jms20subset.Destination

GetJMSReplyTo extracts the native reply information from the MQ message and populates it into a Destination object.

func (*TextMessageImpl) GetJMSTimestamp

func (msg *TextMessageImpl) GetJMSTimestamp() int64

GetJMSTimestamp retrieves the timestamp at which the message was sent from the native MQ message descriptor fields.

func (*TextMessageImpl) GetText

func (msg *TextMessageImpl) GetText() *string

GetText returns the string that is contained in this TextMessage.

func (*TextMessageImpl) SetJMSCorrelationID

func (msg *TextMessageImpl) SetJMSCorrelationID(correlID string) jms20subset.JMSException

SetJMSCorrelationID applies the specified correlation ID string to the native MQ message field used for correlation purposes.

func (*TextMessageImpl) SetJMSReplyTo

SetJMSReplyTo uses the specified Destination object to configure the reply attributes of the native MQ message fields.

func (*TextMessageImpl) SetText

func (msg *TextMessageImpl) SetText(newBody string)

SetText stores the supplied string so that it can be transmitted as part of this TextMessage.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL