Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for WebSocketSubscription2021
- Loading branch information
Showing
54 changed files
with
1,173 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
"Readonly", | ||
"RegExp", | ||
"Server", | ||
"SetMultiMap", | ||
"Shorthand", | ||
"SubscriptionType", | ||
"Template", | ||
|
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
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
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
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
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
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,18 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld", | ||
"import": [ | ||
"css:config/http/notifications/base/description.json", | ||
"css:config/http/notifications/base/handler.json", | ||
"css:config/http/notifications/base/listener.json", | ||
"css:config/http/notifications/base/storage.json", | ||
"css:config/http/notifications/websockets/description.json", | ||
"css:config/http/notifications/websockets/handler.json", | ||
"css:config/http/notifications/websockets/http.json", | ||
"css:config/http/notifications/websockets/subscription.json" | ||
], | ||
"@graph": [ | ||
{ | ||
"comment": "All the relevant components are made in the specific imports seen above." | ||
} | ||
] | ||
} |
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,18 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld", | ||
"@graph": [ | ||
{ | ||
"@id": "urn:solid-server:default:StorageDescriber", | ||
"@type": "ArrayUnionHandler", | ||
"handlers": [ | ||
{ | ||
"comment": "Handles the storage description triples used for discovery of a WebSocketSubscription2021 endpoint.", | ||
"@type": "NotificationDescriber", | ||
"route": { "@id": "urn:solid-server:default:WebSocket2021Route" }, | ||
"relative": "#websocketNotification", | ||
"type": "http://www.w3.org/ns/solid/notifications#WebSocketSubscription2021" | ||
} | ||
] | ||
} | ||
] | ||
} |
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,31 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld", | ||
"@graph": [ | ||
{ | ||
"comment": "Handles the generation and serialization of notifications for WebSocketSubscription2021.", | ||
"@id": "urn:solid-server:default:WebSocket2021NotificationHandler", | ||
"@type": "TypedNotificationHandler", | ||
"type": "WebSocketSubscription2021", | ||
"source": { | ||
"@type": "ComposedNotificationHandler", | ||
"generator": { "@id": "urn:solid-server:default:BaseNotificationGenerator" }, | ||
"serializer": { "@id": "urn:solid-server:default:BaseNotificationSerializer" }, | ||
"emitter": { "@id": "urn:solid-server:default:WebSocket2021Emitter" } | ||
} | ||
}, | ||
{ | ||
"comment": "Emits serialized notifications through WebSockets.", | ||
"@id": "urn:solid-server:default:WebSocket2021Emitter", | ||
"@type": "WebSocket2021Emitter", | ||
"socketMap": { "@id": "urn:solid-server:default:WebSocketMap" } | ||
}, | ||
|
||
{ | ||
"@id": "urn:solid-server:default:NotificationHandler", | ||
"@type": "WaterfallHandler", | ||
"handlers": [ | ||
{ "@id": "urn:solid-server:default:WebSocket2021NotificationHandler" } | ||
] | ||
} | ||
] | ||
} |
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,46 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld", | ||
"@graph": [ | ||
{ | ||
"comment": "Catches newly opened WebSockets and verifies if they belong to a subscription.", | ||
"@id": "urn:solid-server:default:WebSocket2021Listener", | ||
"@type": "WebSocket2021Listener", | ||
"storage": { "@id": "urn:solid-server:default:SubscriptionStorage" }, | ||
"route": { "@id": "urn:solid-server:default:WebSocket2021Route" }, | ||
"handler": { | ||
"@type": "SequenceHandler", | ||
"handlers": [ | ||
{ "@id": "urn:solid-server:default:WebSocket2021Storer" }, | ||
{ "@id": "urn:solid-server:default:WebSocket2021StateHandler" } | ||
] | ||
} | ||
}, | ||
{ | ||
"comment": "Opened WebSockets will be stored in this Map.", | ||
"@id": "urn:solid-server:default:WebSocketMap", | ||
"@type": "WebSocketMap" | ||
}, | ||
{ | ||
"comment": "Stores the opened WebSockets for reuse.", | ||
"@id": "urn:solid-server:default:WebSocket2021Storer", | ||
"@type": "WebSocket2021Storer", | ||
"storage": { "@id": "urn:solid-server:default:SubscriptionStorage" }, | ||
"socketMap": { "@id": "urn:solid-server:default:WebSocketMap" } | ||
}, | ||
{ | ||
"comment": "Handles the state feature of a WebSocketSubscription2021 subscription.", | ||
"@id": "urn:solid-server:default:WebSocket2021StateHandler", | ||
"@type": "BaseStateHandler", | ||
"handler": { "@id": "urn:solid-server:default:WebSocket2021NotificationHandler" }, | ||
"storage": { "@id": "urn:solid-server:default:SubscriptionStorage" } | ||
}, | ||
|
||
{ | ||
"@id": "urn:solid-server:default:ServerConfigurator", | ||
"@type": "ParallelHandler", | ||
"handlers": [ | ||
{ "@id": "urn:solid-server:default:WebSocket2021Listener" } | ||
] | ||
} | ||
] | ||
} |
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,41 @@ | ||
{ | ||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld", | ||
"@graph": [ | ||
{ | ||
"comment": "Handles the subscriptions targeting a WebSocketSubscription2021.", | ||
"@id": "urn:solid-server:default:WebSocket2021Subscriber", | ||
"@type": "OperationRouterHandler", | ||
"baseUrl": { "@id": "urn:solid-server:default:variable:baseUrl" }, | ||
"allowedMethods": [ "POST" ], | ||
"allowedPathNames": [ "/WebSocketSubscription2021/" ], | ||
"handler": { | ||
"@type": "NotificationSubscriber", | ||
"subscriptionType": { "@id": "urn:solid-server:default:WebSocketSubscription2021" }, | ||
"credentialsExtractor": { "@id": "urn:solid-server:default:CredentialsExtractor" }, | ||
"permissionReader": { "@id": "urn:solid-server:default:PermissionReader" }, | ||
"authorizer": { "@id": "urn:solid-server:default:Authorizer" } | ||
} | ||
}, | ||
{ | ||
"@id": "urn:solid-server:default:WebSocket2021Route", | ||
"@type": "RelativePathInteractionRoute", | ||
"base": { "@id": "urn:solid-server:default:NotificationRoute" }, | ||
"relativePath": "/WebSocketSubscription2021/" | ||
}, | ||
{ | ||
"comment": "Contains all the metadata relevant for a WebSocketSubscription2021.", | ||
"@id": "urn:solid-server:default:WebSocketSubscription2021", | ||
"@type": "WebSocketSubscription2021", | ||
"storage": { "@id": "urn:solid-server:default:SubscriptionStorage" }, | ||
"route": { "@id": "urn:solid-server:default:WebSocket2021Route" } | ||
}, | ||
|
||
{ | ||
"@id": "urn:solid-server:default:NotificationTypeHandler", | ||
"@type": "WaterfallHandler", | ||
"handlers": [ | ||
{ "@id": "urn:solid-server:default:WebSocket2021Subscriber" } | ||
] | ||
} | ||
] | ||
} |
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
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
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
Oops, something went wrong.