Skip to content

Commit

Permalink
tests(bindings): JMS 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakisan committed Apr 27, 2024
1 parent 3d88804 commit 86a258e
Show file tree
Hide file tree
Showing 83 changed files with 1,695 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.asyncapi.bindings.googlepubsub.GooglePubSubChannelBinding;
import com.asyncapi.bindings.http.HTTPChannelBinding;
import com.asyncapi.bindings.ibmmq.IBMMQChannelBinding;
import com.asyncapi.bindings.jms.v0._0_1.channel.JMSChannelBinding;
import com.asyncapi.bindings.jms.JMSChannelBinding;
import com.asyncapi.bindings.kafka.v0._4_0.channel.KafkaChannelBinding;
import com.asyncapi.bindings.mercure.v0._1_0.channel.MercureChannelBinding;
import com.asyncapi.bindings.mqtt.v0._1_0.channel.MQTTChannelBinding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.asyncapi.bindings.googlepubsub.GooglePubSubMessageBinding;
import com.asyncapi.bindings.http.HTTPMessageBinding;
import com.asyncapi.bindings.ibmmq.IBMMQMessageBinding;
import com.asyncapi.bindings.jms.v0._0_1.message.JMSMessageBinding;
import com.asyncapi.bindings.jms.JMSMessageBinding;
import com.asyncapi.bindings.kafka.v0._4_0.message.KafkaMessageBinding;
import com.asyncapi.bindings.mercure.v0._1_0.message.MercureMessageBinding;
import com.asyncapi.bindings.mqtt.v0._1_0.message.MQTTMessageBinding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.asyncapi.bindings.googlepubsub.GooglePubSubOperationBinding;
import com.asyncapi.bindings.http.HTTPOperationBinding;
import com.asyncapi.bindings.ibmmq.IBMMQOperationBinding;
import com.asyncapi.bindings.jms.v0._0_1.operation.JMSOperationBinding;
import com.asyncapi.bindings.jms.JMSOperationBinding;
import com.asyncapi.bindings.kafka.v0._4_0.operation.KafkaOperationBinding;
import com.asyncapi.bindings.mercure.v0._1_0.operation.MercureOperationBinding;
import com.asyncapi.bindings.mqtt.v0._1_0.operation.MQTTOperationBinding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.asyncapi.bindings.googlepubsub.GooglePubSubServerBinding;
import com.asyncapi.bindings.http.HTTPServerBinding;
import com.asyncapi.bindings.ibmmq.IBMMQServerBinding;
import com.asyncapi.bindings.jms.v0._0_1.server.JMSServerBinding;
import com.asyncapi.bindings.jms.JMSServerBinding;
import com.asyncapi.bindings.kafka.v0._4_0.server.KafkaServerBinding;
import com.asyncapi.bindings.mercure.v0._1_0.server.MercureServerBinding;
import com.asyncapi.bindings.mqtt.v0._1_0.server.MQTTServerBinding;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.asyncapi.bindings.jms;

import com.asyncapi.bindings.ChannelBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* <p>
* Describes JMS channel binding.
*
* @version 0.1.0
* @see <a href="https://github.com/asyncapi/bindings/tree/master/jms#channel-binding-object">JMS channel binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.jms.v0._0_1.channel.JMSChannelBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.jms.v0._0_1.channel.JMSChannelBinding.class, names = {
"0.0.1",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public class JMSChannelBinding extends ChannelBinding {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.asyncapi.bindings.jms;

import com.asyncapi.bindings.MessageBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* <p>
* Describes JMS message binding.
*
* @version 0.1.0
* @see <a href="https://github.com/asyncapi/bindings/tree/master/jms#message-binding-object">JMS message binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.jms.v0._0_1.message.JMSMessageBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.jms.v0._0_1.message.JMSMessageBinding.class, names = {
"0.0.1",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public class JMSMessageBinding extends MessageBinding {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.asyncapi.bindings.jms;

import com.asyncapi.bindings.OperationBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* <p>
* Describes JMS operation binding.
*
* @version 0.1.0
* @see <a href="https://github.com/asyncapi/bindings/tree/master/jms#operation-binding-object">JMS operation binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.jms.v0._0_1.operation.JMSOperationBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.jms.v0._0_1.operation.JMSOperationBinding.class, names = {
"0.0.1",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public class JMSOperationBinding extends OperationBinding {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.asyncapi.bindings.jms;

import com.asyncapi.bindings.ServerBinding;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.EqualsAndHashCode;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
* <p>
* Describes JMS server binding.
*
* @version 0.1.0
* @see <a href="https://github.com/asyncapi/bindings/tree/master/jms#server-binding-object">JMS server binding</a>
* @author Pavel Bodiachevskii
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
defaultImpl = com.asyncapi.bindings.jms.v0._0_1.server.JMSServerBinding.class,
property = "bindingVersion",
visible = true
)
@JsonSubTypes({
@JsonSubTypes.Type(value = com.asyncapi.bindings.jms.v0._0_1.server.JMSServerBinding.class, names = {
"0.0.1",
"latest"
}),
})
@EqualsAndHashCode(callSuper = true)
public class JMSServerBinding extends ServerBinding {}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.asyncapi.bindings.jms.v0._0_1.channel;

import com.asyncapi.bindings.ChannelBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import org.jetbrains.annotations.Nullable;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
Expand All @@ -15,7 +14,36 @@
* @author Pavel Bodiachevskii
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class JMSChannelBinding extends ChannelBinding {
public class JMSChannelBinding extends com.asyncapi.bindings.jms.JMSChannelBinding {

/**
* The destination (queue) name for this channel.
* <p>
* <b>SHOULD</b> only be specified if the channel name differs from the actual destination name,
* such as when the channel name is not a valid destination name according to the JMS Provider.
* <p>
* Defaults to the channel name.
*/
@Nullable
@JsonProperty("destination")
private String destination;

@Nullable
@JsonProperty("destinationType")
private JMSChannelDestinationType destinationType;

@Override
public String getBindingVersion() {
return "0.0.1";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.0.1");
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.asyncapi.bindings.jms.v0._0_1.channel;

import com.fasterxml.jackson.annotation.JsonProperty;

public enum JMSChannelDestinationType {

@JsonProperty("queue")
QUEUE,

@JsonProperty("fifo-queue")
FIFO_QUEUE

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.asyncapi.bindings.jms.v0._0_1.message;

import com.asyncapi.bindings.MessageBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.asyncapi.v3.schema.AsyncAPISchema;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import org.jetbrains.annotations.Nullable;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
Expand All @@ -15,7 +15,31 @@
* @author Pavel Bodiachevskii
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class JMSMessageBinding extends MessageBinding {
public class JMSMessageBinding extends com.asyncapi.bindings.jms.JMSMessageBinding {

/**
* A Schema object containing the definitions for JMS headers (protocol headers).
* <p>
* This schema <b>MUST</b> be of type 'object' and have a 'properties' key.
* <p>
* Examples of JMS protocol headers are 'JMSMessageID', 'JMSTimestamp', and 'JMSCorrelationID'.
*/
@Nullable
@JsonProperty("headers")
public AsyncAPISchema headers;

@Override
public String getBindingVersion() {
return "0.0.1";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.0.1");
}

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.asyncapi.bindings.jms.v0._0_1.operation;

import com.asyncapi.bindings.OperationBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.jetbrains.annotations.Nullable;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
Expand All @@ -17,5 +17,16 @@
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class JMSOperationBinding extends OperationBinding {
public class JMSOperationBinding extends com.asyncapi.bindings.jms.JMSOperationBinding {

@Override
public String getBindingVersion() {
return "0.0.1";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.0.1");
}

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.asyncapi.bindings.jms.v0._0_1.server;

import com.asyncapi.bindings.ServerBinding;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
* This class MUST NOT contain any properties. Its name is reserved for future use.
Expand All @@ -15,7 +17,45 @@
* @author Pavel Bodiachevskii
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class JMSServerBinding extends ServerBinding {
public class JMSServerBinding extends com.asyncapi.bindings.jms.JMSServerBinding {

/**
* The classname of the ConnectionFactory implementation for the JMS Provider.
*/
@NotNull
@JsonProperty("jmsConnectionFactory")
private String jmsConnectionFactory = "";

/**
* Additional properties to set on the JMS ConnectionFactory implementation for the JMS Provider.
*/
@Nullable
@JsonProperty("properties")
private List<@NotNull JMSServerProperty> properties;

/**
* A client identifier for applications that use this JMS connection factory.
* <p>
* If the Client ID Policy is set to 'Restricted' (the default),
* then configuring a Client ID on the ConnectionFactory prevents more than one JMS client from
* using a connection from this factory.
*/
@Nullable
@JsonProperty("clientID")
private String clientID;

@Override
public String getBindingVersion() {
return "0.0.1";
}

@Override
public void setBindingVersion(@Nullable String bindingVersion) {
super.setBindingVersion("0.0.1");
}

}
Loading

0 comments on commit 86a258e

Please sign in to comment.