Add WebHostResource 31/114131/17
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 22 Oct 2024 15:48:09 +0000 (17:48 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 30 Oct 2024 14:05:41 +0000 (14:05 +0000)
commitc0e7dc5bb7984b2dc49fabf4c4ad1ccd31faaa7d
treee93265f4d0487e83ff3b966589e752da506c9892
parent6f44f97eb8827e5ae79694a01515707781be3ea3
Add WebHostResource

We need the ability to inject secondary services into the NettyEndpoint,
such that they have a reference to the XRD (for now).

This patch introduces WebHostResource as the common execution API, which
are dispatched to from EndpointRoot.

This maps neatly to OSGi whiteboard pattern:
- WebHostResourceProvider is the service published to the whiteboard
- OSGiNettyEndpoint instances are event sources

In other environments SimpleNettyEndpoint's explicit register()/close()
mechanics might prove to be helpful

JIRA: NETCONF-1370
Change-Id: I041059919db7471a11c5e0da75557ff3c48efcda
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 files changed:
apps/restconf-it/src/test/java/org/opendaylight/restconf/server/netty/AbstractE2ETest.java
apps/restconf-it/src/test/java/org/opendaylight/restconf/server/netty/MountPointE2ETest.java
apps/restconf-it/src/test/java/org/opendaylight/restconf/server/netty/OperationsE2ETest.java
apps/restconf-it/src/test/java/org/opendaylight/restconf/server/netty/StreamsE2ETest.java
apps/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/OSGiNorthbound.java
protocol/restconf-server/src/main/java/org/opendaylight/restconf/server/EndpointRoot.java
protocol/restconf-server/src/main/java/org/opendaylight/restconf/server/NettyEndpoint.java
protocol/restconf-server/src/main/java/org/opendaylight/restconf/server/OSGiNettyEndpoint.java [new file with mode: 0644]
protocol/restconf-server/src/main/java/org/opendaylight/restconf/server/RestconfTransportChannelListener.java
protocol/restconf-server/src/main/java/org/opendaylight/restconf/server/SimpleNettyEndpoint.java [new file with mode: 0644]
transport/transport-http/pom.xml
transport/transport-http/src/main/java/org/opendaylight/netconf/transport/http/rfc6415/WebHostResource.java [new file with mode: 0644]
transport/transport-http/src/main/java/org/opendaylight/netconf/transport/http/rfc6415/WebHostResourceInstance.java [new file with mode: 0644]
transport/transport-http/src/main/java/org/opendaylight/netconf/transport/http/rfc6415/WebHostResourceProvider.java [new file with mode: 0644]