Skip to content

Commit

Permalink
Merge pull request #233 from ayeshLK/main
Browse files Browse the repository at this point in the history
Update native-package name of the azure-servicebus connector
  • Loading branch information
ayeshLK authored Jul 8, 2024
2 parents 6e6e88a + 36e49eb commit f292354
Show file tree
Hide file tree
Showing 29 changed files with 161 additions and 193 deletions.
48 changes: 24 additions & 24 deletions ballerina/admin.bal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public isolated client class Administrator {
# + return - Topic properties(Type of asb:TopicProperies) or error
@display {label: "Create Topic"}
isolated remote function createTopic(@display {label: "Topic"} string topicName, @display {label: "Topic Options"} *CreateTopicOptions topicOptions) returns TopicProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Get the topic with the given name.
Expand All @@ -47,7 +47,7 @@ public isolated client class Administrator {
# + return - Topic properties(Type of asb:TopicProperies) or error
@display {label: "Get Topic"}
isolated remote function getTopic(@display {label: "Topic"} string topicName) returns TopicProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Update the topic with the given options.
Expand All @@ -57,15 +57,15 @@ public isolated client class Administrator {
# + return - Topic properties(Type of asb:TopicProperies) or error
@display {label: "Update Topics"}
isolated remote function updateTopic(@display {label: "Topic"} string topicName, @display {label: "Update Topic Options"} *UpdateTopicOptions topicOptions) returns TopicProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# List the topics.
#
# + return - Topic list(Type of asb:TopicList) or error
@display {label: "List Topics"}
isolated remote function listTopics() returns TopicList|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Delete the topic with the given name.
Expand All @@ -74,7 +74,7 @@ public isolated client class Administrator {
# + return - Error or nil
@display {label: "Delete Topic"}
isolated remote function deleteTopic(@display {label: "Topic"} string topicName) returns Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Create a subscription with the given name or name and options.
Expand All @@ -85,7 +85,7 @@ public isolated client class Administrator {
# + return - Subscription properties(Type of asb:SubscriptionProperies) or error
@display {label: "Create Subscription"}
isolated remote function createSubscription(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName, @display {label: "Subscription Options"} *CreateSubscriptionOptions subscriptionOptions) returns SubscriptionProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Get the subscription with the given name.
Expand All @@ -95,7 +95,7 @@ public isolated client class Administrator {
# + return - Subscription properties(Type of asb:SubscriptionProperies) or error
@display {label: "Get Subscription"}
isolated remote function getSubscription(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName) returns SubscriptionProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Update the subscription with the given options.
Expand All @@ -106,7 +106,7 @@ public isolated client class Administrator {
# + return - Subscription properties(Type of asb:SubscriptionProperies) or error
@display {label: "Update Subscription"}
isolated remote function updateSubscription(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName, @display {label: "Update Subscription Options"} *UpdateSubscriptionOptions subscriptionOptions) returns SubscriptionProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# List the subscriptions.
Expand All @@ -115,7 +115,7 @@ public isolated client class Administrator {
# + return - Subscription list(Type of asb:SubscriptionList) or error
@display {label: "List Subscriptions"}
isolated remote function listSubscriptions(@display {label: "Topic"} string topicName) returns SubscriptionList|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Delete the subscription with the given name.
Expand All @@ -125,7 +125,7 @@ public isolated client class Administrator {
# + return - Error or nil
@display {label: "Delete Subscription"}
isolated remote function deleteSubscription(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName) returns Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Get the status of existance of a topic with the given name.
Expand All @@ -134,7 +134,7 @@ public isolated client class Administrator {
# + return - Boolean or error
@display {label: "is Topic Exists"}
isolated remote function topicExists(@display {label: "Exists"} string topicName) returns boolean|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Get the status of existance of a subscription with the given name.
Expand All @@ -144,7 +144,7 @@ public isolated client class Administrator {
# + return - Boolean or error
@display {label: "is Subscription Exists"}
isolated remote function subscriptionExists(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName) returns boolean|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Create a rule with the given name or name and options.
Expand All @@ -156,7 +156,7 @@ public isolated client class Administrator {
# + return - Rule properties(Type of asb:RuleProperies) or error
@display {label: "Create Rule"}
isolated remote function createRule(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName, @display {label: "Rule"} string ruleName, @display {label: "Rule Options"} *CreateRuleOptions ruleOptions) returns RuleProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Delete the rule with the given name.
Expand All @@ -167,7 +167,7 @@ public isolated client class Administrator {
# + return - Error or nil
@display {label: "Get Rule"}
isolated remote function getRule(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName, @display {label: "Rule"} string ruleName) returns RuleProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Update the rule with the options.
Expand All @@ -179,7 +179,7 @@ public isolated client class Administrator {
# + return - Rule properties(Type of asb:RuleProperies) or error
@display {label: "Update Rule"}
isolated remote function updateRule(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName, @display {label: "Rule"} string ruleName, @display {label: "Update Rule Options"} *UpdateRuleOptions ruleOptions) returns RuleProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# List the rules.
Expand All @@ -189,7 +189,7 @@ public isolated client class Administrator {
# + return - Rule list(Type of asb:RuleList) or error
@display {label: "List Rules"}
isolated remote function listRules(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName) returns RuleList|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Delete the rule with the given name.
Expand All @@ -200,7 +200,7 @@ public isolated client class Administrator {
# + return - Error or nil
@display {label: "Delete Rule"}
isolated remote function deleteRule(@display {label: "Topic"} string topicName, @display {label: "Subscription"} string subscriptionName, @display {label: "Rule"} string ruleName) returns Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Create a queue with the given name or name and options.
Expand All @@ -210,7 +210,7 @@ public isolated client class Administrator {
# + return - Queue properties(Type of asb:QueueProperties) or error
@display {label: "Create Queue"}
isolated remote function createQueue(@display {label: "Queue"} string queueName, @display {label: "Queue Options"} *CreateQueueOptions queueOptions) returns QueueProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Get the queue with the given name.
Expand All @@ -219,7 +219,7 @@ public isolated client class Administrator {
# + return - Queue properties(Type of asb:QueueProperties) or error
@display {label: "Get Queue"}
isolated remote function getQueue(@display {label: "Queue"} string queueName) returns QueueProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Update the queue with the options.Q
Expand All @@ -229,14 +229,14 @@ public isolated client class Administrator {
# + return - Queue properties(Type of asb:QueueProperties) or error
@display {label: "Update Queue"}
isolated remote function updateQueue(@display {label: "Queue"} string queueName, @display {label: "Update Queue Options"} *UpdateQueueOptions queueOptions) returns QueueProperties|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# List the queues.
#
# + return - Queue list(Type of asb:QueueList) or error
isolated remote function listQueues() returns QueueList|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Delete the queue with the given name.
Expand All @@ -245,7 +245,7 @@ public isolated client class Administrator {
# + return - Error or nil
@display {label: "Delete Queue"}
isolated remote function deleteQueue(@display {label: "Queue"} string queueName) returns Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;

# Check whether the queue exists.
Expand All @@ -254,10 +254,10 @@ public isolated client class Administrator {
# + return - Boolean or error
@display {label: "is Queue Exists"}
isolated remote function queueExists(@display {label: "Exists"} string queueName) returns boolean|Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;
}

isolated function initializeAdministrator(Administrator adminClient, handle connectionString) returns Error? = @java:Method {
'class: "org.ballerinax.asb.admin.Administrator"
'class: "io.ballerina.lib.asb.admin.Administrator"
} external;
8 changes: 4 additions & 4 deletions ballerina/caller.bal
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public isolated client class Caller {
#
# + return - An `asb:Error` if failed to complete message or else `()`
isolated remote function complete() returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeCaller"
'class: "io.ballerina.lib.asb.listener.NativeCaller"
} external;

# Abandon message from queue or subscription based on messageLockToken. Abandon processing of the message for
Expand All @@ -34,7 +34,7 @@ public isolated client class Caller {
# + propertiesToModify - Message properties to modify
# + return - An `asb:Error` if failed to abandon message or else `()`
isolated remote function abandon(*record {|anydata...;|} propertiesToModify) returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeCaller"
'class: "io.ballerina.lib.asb.listener.NativeCaller"
} external;

# Dead-Letter the message & moves the message to the Dead-Letter Queue based on messageLockToken. Transfer
Expand All @@ -43,7 +43,7 @@ public isolated client class Caller {
# + options - Options to specify while putting message in dead-letter queue
# + return - An `asb:Error` if failed to deadletter message or else `()`
isolated remote function deadLetter(*DeadLetterOptions options) returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeCaller"
'class: "io.ballerina.lib.asb.listener.NativeCaller"
} external;

# Defer the message in a Queue or Subscription based on messageLockToken. It prevents the message from being
Expand All @@ -52,6 +52,6 @@ public isolated client class Caller {
# + propertiesToModify - Message properties to modify
# + return - An `asb:Error` if failed to defer message or else sequence number
isolated remote function defer(*record {|anydata...;|} propertiesToModify) returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeCaller"
'class: "io.ballerina.lib.asb.listener.NativeCaller"
} external;
}
2 changes: 1 addition & 1 deletion ballerina/init.bal
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ function init() {
}

function setModule() returns error? = @java:Method {
'class: "org.ballerinax.asb.util.ModuleUtils"
'class: "io.ballerina.lib.asb.util.ModuleUtils"
} external;
12 changes: 6 additions & 6 deletions ballerina/listener.bal
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public isolated class Listener {


private isolated function externInit(ListenerConfiguration config) returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeListener"
'class: "io.ballerina.lib.asb.listener.NativeListener"
} external;

# Attaches an `asb:Service` to a listener.
Expand All @@ -50,7 +50,7 @@ public isolated class Listener {
# + name - Name of the service
# + return - An `asb:Error` if there is an error or else `()`
public isolated function attach(Service 'service, string[]|string? name = ()) returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeListener"
'class: "io.ballerina.lib.asb.listener.NativeListener"
} external;

# Detaches an `asb:Service` from the the listener.
Expand All @@ -61,7 +61,7 @@ public isolated class Listener {
# + 'service - The service to be detached
# + return - An `asb:Error` if there is an error or else `()`
public isolated function detach(Service 'service) returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeListener"
'class: "io.ballerina.lib.asb.listener.NativeListener"
} external;

# Starts the `asb:Listener`.
Expand All @@ -71,7 +71,7 @@ public isolated class Listener {
#
# + return - An `asb:Error` if there is an error or else `()`
public isolated function 'start() returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeListener"
'class: "io.ballerina.lib.asb.listener.NativeListener"
} external;

# Stops the `asb:Listener` gracefully.
Expand All @@ -81,7 +81,7 @@ public isolated class Listener {
#
# + return - An `asb:Error` if there is an error or else `()`
public isolated function gracefulStop() returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeListener"
'class: "io.ballerina.lib.asb.listener.NativeListener"
} external;

# Stops the `asb:Listener` immediately.
Expand All @@ -91,6 +91,6 @@ public isolated class Listener {
#
# + return - An `asb:Error` if there is an error or else `()`
public isolated function immediateStop() returns Error? = @java:Method {
'class: "org.ballerinax.asb.listener.NativeListener"
'class: "io.ballerina.lib.asb.listener.NativeListener"
} external;
}
Loading

0 comments on commit f292354

Please sign in to comment.