-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
143 changed files
with
5,818 additions
and
28,672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
asyncapi-core/src/main/java/com/asyncapi/bindings/MessageBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
package com.asyncapi.bindings; | ||
|
||
import com.asyncapi.ExtendableObject; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
/** | ||
* Describes AsyncAPI message binding. | ||
* | ||
* @author Pavel Bodiachevskii | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class MessageBinding extends ExtendableObject { | ||
|
||
/** | ||
* The version of this binding. | ||
* <p> | ||
* If omitted, 'latest' <b>MUST</b> be assumed. | ||
*/ | ||
@Nullable | ||
@JsonProperty("bindingVersion") | ||
private String bindingVersion; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
asyncapi-core/src/main/java/com/asyncapi/bindings/websockets/WebSocketsChannelBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.asyncapi.bindings.websockets; | ||
|
||
import com.asyncapi.bindings.ChannelBinding; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
/** | ||
* Describes WebSockets channel binding. | ||
* <p> | ||
* When using WebSockets, the channel represents the connection. | ||
* <p> | ||
* Unlike other protocols that support multiple virtual channels (topics, routing keys, etc.) per connection, | ||
* WebSockets doesn't support virtual channels or, put it another way, there's only one channel and its characteristics | ||
* are strongly related to the protocol used for the handshake, i.e., HTTP. | ||
* | ||
* @version 0.1.0 | ||
* @see <a href="https://github.com/asyncapi/bindings/tree/master/websockets#channel-binding-object">WebSockets channel binding</a> | ||
* @author Pavel Bodiachevskii | ||
*/ | ||
@JsonTypeInfo( | ||
use = JsonTypeInfo.Id.NAME, | ||
include = JsonTypeInfo.As.EXISTING_PROPERTY, | ||
defaultImpl = com.asyncapi.bindings.websockets.v0._1_0.channel.WebSocketsChannelBinding.class, | ||
property = "bindingVersion", | ||
visible = true | ||
) | ||
@JsonSubTypes({ | ||
@JsonSubTypes.Type(value = com.asyncapi.bindings.websockets.v0._1_0.channel.WebSocketsChannelBinding.class, names = { | ||
"0.1.0", | ||
"latest" | ||
}), | ||
}) | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public abstract class WebSocketsChannelBinding extends ChannelBinding {} |
35 changes: 35 additions & 0 deletions
35
asyncapi-core/src/main/java/com/asyncapi/bindings/websockets/WebSocketsMessageBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.asyncapi.bindings.websockets; | ||
|
||
import com.asyncapi.bindings.MessageBinding; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
/** | ||
* This class <b>MUST NOT</b> contain any properties. | ||
* <p> | ||
* Its name is reserved for future use. | ||
* <p> | ||
* Describes WebSockets message binding. | ||
* | ||
* @version 0.1.0 | ||
* @see <a href="https://github.com/asyncapi/bindings/tree/master/websockets#message-binding-object">WebSockets message binding</a> | ||
* @author Pavel Bodiachevskii | ||
*/ | ||
@JsonTypeInfo( | ||
use = JsonTypeInfo.Id.NAME, | ||
include = JsonTypeInfo.As.EXISTING_PROPERTY, | ||
defaultImpl = com.asyncapi.bindings.websockets.v0._1_0.message.WebSocketsMessageBinding.class, | ||
property = "bindingVersion", | ||
visible = true | ||
) | ||
@JsonSubTypes({ | ||
@JsonSubTypes.Type(value = com.asyncapi.bindings.websockets.v0._1_0.message.WebSocketsMessageBinding.class, names = { | ||
"0.1.0", | ||
"latest" | ||
}), | ||
}) | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public abstract class WebSocketsMessageBinding extends MessageBinding {} |
35 changes: 35 additions & 0 deletions
35
asyncapi-core/src/main/java/com/asyncapi/bindings/websockets/WebSocketsOperationBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.asyncapi.bindings.websockets; | ||
|
||
import com.asyncapi.bindings.OperationBinding; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
/** | ||
* This class <b>MUST NOT</b> contain any properties. | ||
* <p> | ||
* Its name is reserved for future use. | ||
* <p> | ||
* Describes WebSockets operation binding. | ||
* | ||
* @version 0.1.0 | ||
* @see <a href="https://github.com/asyncapi/bindings/tree/master/websockets#operation-binding-object">WebSockets operation binding</a> | ||
* @author Pavel Bodiachevskii | ||
*/ | ||
@JsonTypeInfo( | ||
use = JsonTypeInfo.Id.NAME, | ||
include = JsonTypeInfo.As.EXISTING_PROPERTY, | ||
defaultImpl = com.asyncapi.bindings.websockets.v0._1_0.operation.WebSocketsOperationBinding.class, | ||
property = "bindingVersion", | ||
visible = true | ||
) | ||
@JsonSubTypes({ | ||
@JsonSubTypes.Type(value = com.asyncapi.bindings.websockets.v0._1_0.operation.WebSocketsOperationBinding.class, names = { | ||
"0.1.0", | ||
"latest" | ||
}), | ||
}) | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public abstract class WebSocketsOperationBinding extends OperationBinding {} |
35 changes: 35 additions & 0 deletions
35
asyncapi-core/src/main/java/com/asyncapi/bindings/websockets/WebSocketsServerBinding.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.asyncapi.bindings.websockets; | ||
|
||
import com.asyncapi.bindings.ServerBinding; | ||
import com.fasterxml.jackson.annotation.JsonSubTypes; | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
/** | ||
* This class <b>MUST NOT</b> contain any properties. | ||
* <p> | ||
* Its name is reserved for future use. | ||
* <p> | ||
* Describes WebSockets server binding. | ||
* | ||
* @version 0.1.0 | ||
* @see <a href="https://github.com/asyncapi/bindings/tree/master/websockets#server-binding-object">WebSockets server binding</a> | ||
* @author Pavel Bodiachevskii | ||
*/ | ||
@JsonTypeInfo( | ||
use = JsonTypeInfo.Id.NAME, | ||
include = JsonTypeInfo.As.EXISTING_PROPERTY, | ||
defaultImpl = com.asyncapi.bindings.websockets.v0._1_0.server.WebSocketsServerBinding.class, | ||
property = "bindingVersion", | ||
visible = true | ||
) | ||
@JsonSubTypes({ | ||
@JsonSubTypes.Type(value = com.asyncapi.bindings.websockets.v0._1_0.server.WebSocketsServerBinding.class, names = { | ||
"0.1.0", | ||
"latest" | ||
}), | ||
}) | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public abstract class WebSocketsServerBinding extends ServerBinding {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.