Skip to content

Commit

Permalink
Refactor according to the review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Oct 31, 2023
1 parent 5a26895 commit d3ba517
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions ballerina/destination.bal
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ public isolated client class Queue {
# Retrieves a message from an IBM MQ queue.
#
# + getMessageOptions - Options to control message retrieval
# + return - An `ibmmq:Message` if there is any message in the queue, `()` if there
# + return - An `ibmmq:Message` if there is a message in the queue, `()` if there
# is no message or else `ibmmq:Error` if the operation fails
remote function get(*GetMessageOptions getMessageOptions) returns Message|Error? =
@java:Method {
'class: "io.ballerina.lib.ibm.ibmmq.Queue"
} external;

# Closes the IBM MQ queue object. No further operations on this object are permitted after it is closed.
#
# + return - An `ibmmq:Error` if the operation fails or else `()`
remote function close() returns Error? =
@java:Method {
'class: "io.ballerina.lib.ibm.ibmmq.Queue"
Expand All @@ -70,13 +73,16 @@ public isolated client class Topic {
# Retrieves a message from an IBM MQ topic.
#
# + getMessageOptions - Options to control message retrieval
# + return - An `ibmmq:Message` if there is any message in the queue, `()` if there
# + return - An `ibmmq:Message` if there is a message in the topic, `()` if there
# is no message or else `ibmmq:Error` if the operation fails
remote function get(*GetMessageOptions getMessageOptions) returns Message|Error? =
@java:Method {
'class: "io.ballerina.lib.ibm.ibmmq.Topic"
} external;

# Closes the IBM MQ topic object. No further operations on this object are permitted after it is closed.
#
# + return - An `ibmmq:Error` if the operation fails or else `()`
remote function close() returns Error? =
@java:Method {
'class: "io.ballerina.lib.ibm.ibmmq.Topic"
Expand Down
2 changes: 1 addition & 1 deletion ballerina/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public type QueueManagerConfiguration record {|
# IBM MQ get message options.
#
# + options - Get message option
# + waitInterval - The maximum time (in seconds) that an `get` call waits for a suitable message to
# + waitInterval - The maximum time (in seconds) that a `get` call waits for a suitable message to
# arrive. It is used in conjunction with `ibmmq.MQGMO_WAIT`.
public type GetMessageOptions record {|
int options = MQGMO_NO_WAIT;
Expand Down

0 comments on commit d3ba517

Please sign in to comment.